@Test public void testCaseInsensitive() throws IOException { File sourceRoot = new File("target/test-classes").getCanonicalFile(); ClasspathEntry cpe = ClasspathDirectory.create(sourceRoot.toPath()); String pkg = getClass().getPackage().getName().replace('.', '/'); String cls = getClass().getSimpleName(); Assert.assertNotNull(cpe.findType(pkg, cls)); Assert.assertNull(cpe.findType(pkg, cls.toLowerCase())); Assert.assertNull(cpe.findType(pkg.toUpperCase(), cls)); }
@Override public NameEnvironmentAnswer findType(char[][] compoundTypeName) { if (compoundTypeName == null) { return null; } int typeNameIndex = compoundTypeName.length - 1; char[][] packageName = CharOperation.subarray(compoundTypeName, 0, typeNameIndex); return findType(new String(CharOperation.concatWith(packageName, '/')), new String(compoundTypeName[typeNameIndex])); }
Classpath implements INameEnvironment { @Override public NameEnvironmentAnswer findType(char[][] compoundTypeName) { if (compoundTypeName == null) { return null; } int typeNameIndex = compoundTypeName.length - 1; char[][] packageName = CharOperation.subarray(compoundTypeName, 0, typeNameIndex); return findType(new String(CharOperation.concatWith(packageName, '/')), new String(compoundTypeName[typeNameIndex])); } }
Classpath implements INameEnvironment { @Override public NameEnvironmentAnswer findType(char[][] compoundTypeName) { if (compoundTypeName == null) { return null; } int typeNameIndex = compoundTypeName.length - 1; char[][] packageName = CharOperation.subarray(compoundTypeName, 0, typeNameIndex); return findType(new String(CharOperation.concatWith(packageName, '/')), new String(compoundTypeName[typeNameIndex])); } Classpath(List<ClasspathEntry> entries, List<MutableClasspathEntry> localentries); }
Classpath implements INameEnvironment { @Override public NameEnvironmentAnswer findType(char[][] compoundTypeName) { if (compoundTypeName == null) { return null; } int typeNameIndex = compoundTypeName.length - 1; char[][] packageName = CharOperation.subarray(compoundTypeName, 0, typeNameIndex); return findType(new String(CharOperation.concatWith(packageName, '/')), new String(compoundTypeName[typeNameIndex])); } Classpath(List<ClasspathEntry> entries, List<MutableClasspathEntry> localentries); @Override NameEnvironmentAnswer findType(char[][] compoundTypeName); @Override NameEnvironmentAnswer findType(char[] typeName, char[][] packageName); @Override boolean isPackage(char[][] parentPackageName, char[] packageName); @Override void cleanup(); void reset(); List<ClasspathEntry> getEntries(); }
Classpath implements INameEnvironment { @Override public NameEnvironmentAnswer findType(char[][] compoundTypeName) { if (compoundTypeName == null) { return null; } int typeNameIndex = compoundTypeName.length - 1; char[][] packageName = CharOperation.subarray(compoundTypeName, 0, typeNameIndex); return findType(new String(CharOperation.concatWith(packageName, '/')), new String(compoundTypeName[typeNameIndex])); } Classpath(List<ClasspathEntry> entries, List<MutableClasspathEntry> localentries); @Override NameEnvironmentAnswer findType(char[][] compoundTypeName); @Override NameEnvironmentAnswer findType(char[] typeName, char[][] packageName); @Override boolean isPackage(char[][] parentPackageName, char[] packageName); @Override void cleanup(); void reset(); List<ClasspathEntry> getEntries();  }