public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) { if (!isPackage(qualifiedPackageName)) return null; // most common case try { ClassFileReader reader = ClassFileReader.read(this.zipFile, qualifiedBinaryFileName); if (reader != null) return new NameEnvironmentAnswer(reader, fetchAccessRestriction(qualifiedBinaryFileName)); } catch(ClassFormatException e) { // treat as if class file is missing } catch (IOException e) { // treat as if class file is missing } return null; } public char[][][] findTypeNames(String qualifiedPackageName) {
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName) { return findClass(typeName, qualifiedPackageName, qualifiedBinaryFileName, false); } public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) {
public IModule getModule() { if (this.isAutoModule && this.module == null) { Manifest manifest = null; try { initialize(); ZipEntry entry = this.zipFile.getEntry(TypeConstants.META_INF_MANIFEST_MF); if (entry != null) manifest = new Manifest(this.zipFile.getInputStream(entry)); } catch (IOException e) { // no usable manifest } return this.module = IModule.createAutomatic(this.file.getName(), true, manifest); } return this.module; } }
initialize(); ArrayList result = new ArrayList(); ZipEntry manifest = this.zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$ if (problemReporter != null) { if (!success || analyzer.getClasspathSectionsCount() == 1 && calledFileNames == null) { problemReporter.invalidClasspathSection(getPath()); } else if (analyzer.getClasspathSectionsCount() > 1) { problemReporter.multipleClasspathSections(getPath()); String directoryPath = getPath(); int lastSeparator = directoryPath.lastIndexOf(File.separatorChar); directoryPath = directoryPath.substring(0, lastSeparator + 1); // potentially empty (see bug 214731) while (calledFilesIterator.hasNext()) { result.add(new ClasspathJar(new File(directoryPath + (String) calledFilesIterator.next()), this.closeZipFileAtEnd, this.accessRuleSet, this.destinationPath));
public char[] normalizedPath() { if (this.normalizedPath == null) { String path2 = this.getPath(); char[] rawName = path2.toCharArray(); if (File.separatorChar == '\\') { CharOperation.replace(rawName, '\\', '/'); } this.normalizedPath = CharOperation.subarray(rawName, 0, CharOperation.lastIndexOf('.', rawName)); } return this.normalizedPath; } public String getPath() {
public char[][][] findTypeNames(String qualifiedPackageName) { if (!isPackage(qualifiedPackageName)) return null; // most common case
result = new ClasspathJar(file, true, accessRuleSet, null);
initialize(); ArrayList result = new ArrayList(); ZipEntry manifest = this.zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$ if (problemReporter != null) { if (!success || analyzer.getClasspathSectionsCount() == 1 && calledFileNames == null) { problemReporter.invalidClasspathSection(getPath()); } else if (analyzer.getClasspathSectionsCount() > 1) { problemReporter.multipleClasspathSections(getPath()); String directoryPath = getPath(); int lastSeparator = directoryPath.lastIndexOf(File.separatorChar); directoryPath = directoryPath.substring(0, lastSeparator + 1); // potentially empty (see bug 214731) while (calledFilesIterator.hasNext()) { result.add(new ClasspathJar(new File(directoryPath + (String) calledFilesIterator.next()), this.closeZipFileAtEnd, this.accessRuleSet, this.destinationPath));
public char[] normalizedPath() { if (this.normalizedPath == null) { String path2 = this.getPath(); char[] rawName = path2.toCharArray(); if (File.separatorChar == '\\') { CharOperation.replace(rawName, '\\', '/'); } this.normalizedPath = CharOperation.subarray(rawName, 0, CharOperation.lastIndexOf('.', rawName)); } return this.normalizedPath; } public String getPath() {
public char[][][] findTypeNames(String qualifiedPackageName) { if (!isPackage(qualifiedPackageName)) return null; // most common case
} else if (destinationPath == null) { result = new ClasspathJar(file, true, accessRuleSet, null);
initialize(); ArrayList result = new ArrayList(); ZipEntry manifest = this.zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$ if (problemReporter != null) { if (!success || analyzer.getClasspathSectionsCount() == 1 && calledFileNames == null) { problemReporter.invalidClasspathSection(getPath()); } else if (analyzer.getClasspathSectionsCount() > 1) { problemReporter.multipleClasspathSections(getPath()); String directoryPath = getPath(); int lastSeparator = directoryPath.lastIndexOf(File.separatorChar); directoryPath = directoryPath.substring(0, lastSeparator + 1); // potentially empty (see bug 214731) while (calledFilesIterator.hasNext()) { result.add(new ClasspathJar(new File(directoryPath + (String) calledFilesIterator.next()), this.closeZipFileAtEnd, this.accessRuleSet, this.destinationPath));
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) { if (!isPackage(qualifiedPackageName)) return null; // most common case try { ClassFileReader reader = ClassFileReader.read(this.zipFile, qualifiedBinaryFileName); if (reader != null) return new NameEnvironmentAnswer(reader, fetchAccessRestriction(qualifiedBinaryFileName)); } catch(ClassFormatException e) { // treat as if class file is missing } catch (IOException e) { // treat as if class file is missing } return null; } public char[][][] findTypeNames(String qualifiedPackageName) {
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName) { return findClass(typeName, qualifiedPackageName, qualifiedBinaryFileName, false); } public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) {
public char[] normalizedPath() { if (this.normalizedPath == null) { String path2 = this.getPath(); char[] rawName = path2.toCharArray(); if (File.separatorChar == '\\') { CharOperation.replace(rawName, '\\', '/'); } this.normalizedPath = CharOperation.subarray(rawName, 0, CharOperation.lastIndexOf('.', rawName)); } return this.normalizedPath; } public String getPath() {
@Override public char[][][] findTypeNames(final String qualifiedPackageName, String moduleName) { if (!isPackage(qualifiedPackageName, moduleName)) return null; // most common case final char[] packageArray = qualifiedPackageName.toCharArray();
} else if (destinationPath == null) { result = new ClasspathJar(file, true, accessRuleSet, null);
@Override public IModule getModule() { if (this.isAutoModule && this.module == null) { Manifest manifest = null; try { initialize(); ZipEntry entry = this.zipFile.getEntry(TypeConstants.META_INF_MANIFEST_MF); if (entry != null) manifest = new Manifest(this.zipFile.getInputStream(entry)); } catch (IOException e) { // no usable manifest } return this.module = IModule.createAutomatic(this.file.getName(), true, manifest); } return this.module; } }
initialize(); ArrayList result = new ArrayList(); ZipEntry manifest = this.zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$ if (problemReporter != null) { if (!success || analyzer.getClasspathSectionsCount() == 1 && calledFileNames == null) { problemReporter.invalidClasspathSection(getPath()); } else if (analyzer.getClasspathSectionsCount() > 1) { problemReporter.multipleClasspathSections(getPath()); String directoryPath = getPath(); int lastSeparator = directoryPath.lastIndexOf(File.separatorChar); directoryPath = directoryPath.substring(0, lastSeparator + 1); // potentially empty (see bug 214731) while (calledFilesIterator.hasNext()) { result.add(new ClasspathJar(new File(directoryPath + (String) calledFilesIterator.next()), this.closeZipFileAtEnd, this.accessRuleSet, this.destinationPath));
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) { if (!isPackage(qualifiedPackageName)) return null; // most common case try { ClassFileReader reader = ClassFileReader.read(this.zipFile, qualifiedBinaryFileName); if (reader != null) return new NameEnvironmentAnswer(reader, fetchAccessRestriction(qualifiedBinaryFileName)); } catch(ClassFormatException e) { // treat as if class file is missing } catch (IOException e) { // treat as if class file is missing } return null; } public char[][][] findTypeNames(String qualifiedPackageName) {