@Override public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] moduleName) { return findClass( String.valueOf(CharOperation.concatWith(packageName, typeName, '/')), typeName, LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); }
@Override public NameEnvironmentAnswer findType(char[][] compoundName, char[] moduleName) { if (compoundName != null) return findClass( String.valueOf(CharOperation.concatWith(compoundName, '/')), compoundName[compoundName.length - 1], LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); return null; }
@Override public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] moduleName) { if (typeName != null) return findClass( new String(CharOperation.concatWith(packageName, typeName, '/')), typeName, LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); return null; }
String pkgName = String.valueOf(CharOperation.concatWith(qualifiedPackageName, '/')); LookupStrategy strategy = LookupStrategy.get(moduleName); String modName = LookupStrategy.getStringName(moduleName); switch (strategy) {
String pkgName = String.valueOf(CharOperation.concatWith(qualifiedPackageName, '/')); LookupStrategy strategy = LookupStrategy.get(moduleName); String modName = LookupStrategy.getStringName(moduleName); switch (strategy) {
@Override public boolean hasCompilationUnit(char[][] qualifiedPackageName, char[] moduleName, boolean checkCUs) { String qualifiedPackageNameString = String.valueOf(CharOperation.concatWith(qualifiedPackageName, '/')); LookupStrategy strategy = LookupStrategy.get(moduleName); String moduleNameString = LookupStrategy.getStringName(moduleName); if (strategy == LookupStrategy.Named) { if (this.moduleLocations != null) { ClasspathLocation location = this.moduleLocations.get(moduleNameString); if (location != null) return location.hasCompilationUnit(qualifiedPackageNameString, moduleNameString); } } else { for (ClasspathLocation location : this.locationSet) { if (strategy.matches(location, ClasspathLocation::hasModule) ) if (location.hasCompilationUnit(qualifiedPackageNameString, moduleNameString)) return true; } } return false; }
@Override public boolean hasCompilationUnit(char[][] qualifiedPackageName, char[] moduleName, boolean checkCUs) { String qualifiedPackageNameString = String.valueOf(CharOperation.concatWith(qualifiedPackageName, '/')); LookupStrategy strategy = LookupStrategy.get(moduleName); String moduleNameString = LookupStrategy.getStringName(moduleName); if (strategy == LookupStrategy.Named) { if (this.moduleLocations != null) { ClasspathLocation location = this.moduleLocations.get(moduleNameString); if (location != null) return location.hasCompilationUnit(qualifiedPackageNameString, moduleNameString); } } else { for (ClasspathLocation location : this.locationSet) { if (strategy.matches(location, ClasspathLocation::hasModule) ) if (location.hasCompilationUnit(qualifiedPackageNameString, moduleNameString)) return true; } } return false; }
@Override public NameEnvironmentAnswer findType(char[][] compoundName, char[] moduleName) { if (compoundName != null) return findClass( String.valueOf(CharOperation.concatWith(compoundName, '/')), compoundName[compoundName.length - 1], LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); return null; }
@Override public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] moduleName) { if (typeName != null) return findClass( new String(CharOperation.concatWith(packageName, typeName, '/')), typeName, LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); return null; }
@Override public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] moduleName) { return findClass( String.valueOf(CharOperation.concatWith(packageName, typeName, '/')), typeName, LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); }
@Override public NameEnvironmentAnswer findType(char[][] compoundName, char[] moduleName) { if (compoundName != null) return findClass( new String(CharOperation.concatWith(compoundName, '/')), compoundName[compoundName.length - 1], LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); return null; }
@Override public NameEnvironmentAnswer findType(char[][] compoundName, char[] moduleName) { if (compoundName != null) return findClass( new String(CharOperation.concatWith(compoundName, '/')), compoundName[compoundName.length - 1], LookupStrategy.get(moduleName), LookupStrategy.getStringName(moduleName)); return null; }