/** * Returns whether the given type binding matches the given simple name pattern * qualification pattern and enclosing type name pattern. */ protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, char[] enclosingNamePattern, TypeBinding type) { if (enclosingNamePattern == null) return resolveLevelForType(simpleNamePattern, qualificationPattern, type); if (qualificationPattern == null) return resolveLevelForType(simpleNamePattern, enclosingNamePattern, type); // case of an import reference while searching for ALL_OCCURENCES of a type (see bug 37166) if (type instanceof ProblemReferenceBinding) return IMPOSSIBLE_MATCH; // pattern was created from a Java element: qualification is the package name. char[] fullQualificationPattern = CharOperation.concat(qualificationPattern, enclosingNamePattern, '.'); if (CharOperation.equals(this.pattern.pkg, CharOperation.concatWith(type.getPackage().compoundName, '.'))) return resolveLevelForType(simpleNamePattern, fullQualificationPattern, type); return IMPOSSIBLE_MATCH; } private HashSet<String> getModuleGraph(String mName, TypeDeclarationPattern typePattern, HashSet<String> mGraph) {
/** * Returns whether the given type binding matches the given simple name pattern * qualification pattern and enclosing type name pattern. */ protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, char[] enclosingNamePattern, TypeBinding type) { if (enclosingNamePattern == null) return resolveLevelForType(simpleNamePattern, qualificationPattern, type); if (qualificationPattern == null) return resolveLevelForType(simpleNamePattern, enclosingNamePattern, type); // case of an import reference while searching for ALL_OCCURENCES of a type (see bug 37166) if (type instanceof ProblemReferenceBinding) return IMPOSSIBLE_MATCH; // pattern was created from a Java element: qualification is the package name. char[] fullQualificationPattern = CharOperation.concat(qualificationPattern, enclosingNamePattern, '.'); if (CharOperation.equals(this.pattern.pkg, CharOperation.concatWith(type.getPackage().compoundName, '.'))) return resolveLevelForType(simpleNamePattern, fullQualificationPattern, type); return IMPOSSIBLE_MATCH; } private HashSet<String> getModuleGraph(String mName, TypeDeclarationPattern typePattern, HashSet<String> mGraph) {
/** * Returns whether the given type binding matches the given simple name pattern * qualification pattern and enclosing type name pattern. */ protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, char[] enclosingNamePattern, TypeBinding type) { if (enclosingNamePattern == null) return resolveLevelForType(simpleNamePattern, qualificationPattern, type); if (qualificationPattern == null) return resolveLevelForType(simpleNamePattern, enclosingNamePattern, type); // case of an import reference while searching for ALL_OCCURENCES of a type (see bug 37166) if (type instanceof ProblemReferenceBinding) return IMPOSSIBLE_MATCH; // pattern was created from a Java element: qualification is the package name. char[] fullQualificationPattern = CharOperation.concat(qualificationPattern, enclosingNamePattern, '.'); if (CharOperation.equals(this.pattern.pkg, CharOperation.concatWith(type.getPackage().compoundName, '.'))) return resolveLevelForType(simpleNamePattern, fullQualificationPattern, type); return IMPOSSIBLE_MATCH; } public String toString() {
/** * Returns whether the given type binding matches the given simple name pattern * qualification pattern and enclosing type name pattern. */ protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, char[] enclosingNamePattern, TypeBinding type) { if (enclosingNamePattern == null) return resolveLevelForType(simpleNamePattern, qualificationPattern, type); if (qualificationPattern == null) return resolveLevelForType(simpleNamePattern, enclosingNamePattern, type); // case of an import reference while searching for ALL_OCCURENCES of a type (see bug 37166) if (type instanceof ProblemReferenceBinding) return IMPOSSIBLE_MATCH; // pattern was created from a Java element: qualification is the package name. char[] fullQualificationPattern = CharOperation.concat(qualificationPattern, enclosingNamePattern, '.'); if (CharOperation.equals(this.pattern.pkg, CharOperation.concatWith(type.getPackage().compoundName, '.'))) return resolveLevelForType(simpleNamePattern, fullQualificationPattern, type); return IMPOSSIBLE_MATCH; } public String toString() {
/** * Returns whether the given type binding matches the given simple name pattern * qualification pattern and enclosing type name pattern. */ protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, char[] enclosingNamePattern, TypeBinding type) { if (enclosingNamePattern == null) return resolveLevelForType(simpleNamePattern, qualificationPattern, type); if (qualificationPattern == null) return resolveLevelForType(simpleNamePattern, enclosingNamePattern, type); // case of an import reference while searching for ALL_OCCURENCES of a type (see bug 37166) if (type instanceof ProblemReferenceBinding) return IMPOSSIBLE_MATCH; // pattern was created from a Java element: qualification is the package name. char[] fullQualificationPattern = CharOperation.concat(qualificationPattern, enclosingNamePattern, '.'); if (CharOperation.equals(this.pattern.pkg, CharOperation.concatWith(type.getPackage().compoundName, '.'))) return resolveLevelForType(simpleNamePattern, fullQualificationPattern, type); return IMPOSSIBLE_MATCH; } public String toString() {
/** * Returns whether the given type binding matches the given simple name pattern * qualification pattern and enclosing type name pattern. */ protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, char[] enclosingNamePattern, TypeBinding type) { if (enclosingNamePattern == null) return resolveLevelForType(simpleNamePattern, qualificationPattern, type); if (qualificationPattern == null) return resolveLevelForType(simpleNamePattern, enclosingNamePattern, type); // case of an import reference while searching for ALL_OCCURENCES of a type (see bug 37166) if (type instanceof ProblemReferenceBinding) return IMPOSSIBLE_MATCH; // pattern was created from a Java element: qualification is the package name. char[] fullQualificationPattern = CharOperation.concat(qualificationPattern, enclosingNamePattern, '.'); if (CharOperation.equals(this.pattern.pkg, CharOperation.concatWith(type.getPackage().compoundName, '.'))) return resolveLevelForType(simpleNamePattern, fullQualificationPattern, type); return IMPOSSIBLE_MATCH; } public String toString() {
return resolveLevelForType(qualifiedPattern.simpleName, qualifiedPattern.qualification, type); } else { char[] enclosingTypeName = this.pattern.enclosingTypeNames == null ? null : CharOperation.concatWith(this.pattern.enclosingTypeNames, '.'); return resolveLevelForType(this.pattern.simpleName, this.pattern.pkg, enclosingTypeName, type);
return resolveLevelForType(qualifiedPattern.simpleName, qualifiedPattern.qualification, type); } else { char[] enclosingTypeName = this.pattern.enclosingTypeNames == null ? null : CharOperation.concatWith(this.pattern.enclosingTypeNames, '.'); return resolveLevelForType(this.pattern.simpleName, this.pattern.pkg, enclosingTypeName, type);
return resolveLevelForType(qualifiedPattern.simpleName, qualifiedPattern.qualification, type); } else { char[] enclosingTypeName = this.pattern.enclosingTypeNames == null ? null : CharOperation.concatWith(this.pattern.enclosingTypeNames, '.'); return resolveLevelForType(this.pattern.simpleName, this.pattern.pkg, enclosingTypeName, type);
return resolveLevelForType(qualifiedPattern.simpleName, qualifiedPattern.qualification, type); } else { char[] enclosingTypeName = this.pattern.enclosingTypeNames == null ? null : CharOperation.concatWith(this.pattern.enclosingTypeNames, '.'); return resolveLevelForType(this.pattern.simpleName, this.pattern.pkg, enclosingTypeName, type);
return resolveLevelForType(qualifiedPattern.simpleName, qualifiedPattern.qualification, type); } else { char[] enclosingTypeName = this.pattern.enclosingTypeNames == null ? null : CharOperation.concatWith(this.pattern.enclosingTypeNames, '.'); return resolveLevelForType(this.pattern.simpleName, this.pattern.pkg, enclosingTypeName, type);
return resolveLevelForType(qualifiedPattern.simpleName, qualifiedPattern.qualification, type); } else { char[] enclosingTypeName = this.pattern.enclosingTypeNames == null ? null : CharOperation.concatWith(this.pattern.enclosingTypeNames, '.'); return resolveLevelForType(this.pattern.simpleName, this.pattern.pkg, enclosingTypeName, type);