public final class AugmentUtils {
- private AugmentUtils() {
- }
-
private static final String REGEX_PATH_REL1 = "\\.\\.?\\s*/(.+)";
private static final String REGEX_PATH_REL2 = "//.*";
+ private AugmentUtils() {
+ }
+
public static Iterable<QName> parseAugmentPath(StmtContext<?, ?, ?> ctx, String path) {
if (path.matches(REGEX_PATH_REL1) || path.matches(REGEX_PATH_REL2)) {
noCopyDefSet.add(Rfc6020Mapping.USES);
StatementDefinition def = stmtContext.getPublicDefinition();
- return (!noCopyDefSet.contains(def));
+ return !noCopyDefSet.contains(def);
}
public static boolean isReusedByAugment(StmtContext<?, ?, ?> stmtContext) {
- HashSet<StatementDefinition> reusedDefSet = new HashSet<>();
+ Set<StatementDefinition> reusedDefSet = new HashSet<>();
reusedDefSet.add(Rfc6020Mapping.TYPEDEF);
StatementDefinition def = stmtContext.getPublicDefinition();
- if (reusedDefSet.contains(def))
- return true;
- else
- return false;
+
+ return reusedDefSet.contains(def);
}
public static StatementContextBase<?, ?, ?> getAugmentTargetCtx(