ReferenceBinding askForType(PackageBinding packageBinding, char[] name) { if (packageBinding == null) { if (this.defaultPackage == null) return null; packageBinding = this.defaultPackage; } NameEnvironmentAnswer answer = this.nameEnvironment.findType(name, packageBinding.compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), packageBinding, answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); } return packageBinding.getType0(name); }
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
ReferenceBinding askForType(PackageBinding packageBinding, char[] name) { if (packageBinding == null) { packageBinding = this.defaultPackage; } NameEnvironmentAnswer answer = this.nameEnvironment.findType(name, packageBinding.compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), packageBinding, answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache try { this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } catch (AbortCompilation abort) { if (CharOperation.equals(name, TypeConstants.PACKAGE_INFO_NAME)) return null; // silently, requestor may not be able to handle compilation units (HierarchyResolver) throw abort; } } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); } return packageBinding.getType0(name); }
ReferenceBinding askForType(PackageBinding packageBinding, char[] name) { if (packageBinding == null) { packageBinding = this.defaultPackage; } NameEnvironmentAnswer answer = this.nameEnvironment.findType(name, packageBinding.compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), packageBinding, answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache try { this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } catch (AbortCompilation abort) { if (CharOperation.equals(name, TypeConstants.PACKAGE_INFO_NAME)) return null; // silently, requestor may not be able to handle compilation units (HierarchyResolver) throw abort; } } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); } return packageBinding.getType0(name); }
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
ReferenceBinding askForType(PackageBinding packageBinding, char[] name) { if (packageBinding == null) { packageBinding = this.defaultPackage; } NameEnvironmentAnswer answer = this.nameEnvironment.findType(name, packageBinding.compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), packageBinding, answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache try { this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } catch (AbortCompilation abort) { if (CharOperation.equals(name, TypeConstants.PACKAGE_INFO_NAME)) return null; // silently, requestor may not be able to handle compilation units (HierarchyResolver) throw abort; } } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); } return packageBinding.getType0(name); }
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
/** * Ask the name environment for a type which corresponds to the compoundName. * Answer null if the name cannot be found. */ public ReferenceBinding askForType(char[][] compoundName) { NameEnvironmentAnswer answer = this.nameEnvironment.findType(compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), computePackageFrom(compoundName, false /* valid pkg */), answer.getAccessRestriction()); } return getCachedType(compoundName); } /* Ask the oracle for a type named name in the packageBinding.
ReferenceBinding askForType(PackageBinding packageBinding, char[] name) { if (packageBinding == null) { packageBinding = this.defaultPackage; } NameEnvironmentAnswer answer = this.nameEnvironment.findType(name, packageBinding.compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), packageBinding, answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache try { this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } catch (AbortCompilation abort) { if (CharOperation.equals(name, TypeConstants.PACKAGE_INFO_NAME)) return null; // silently, requestor may not be able to handle compilation units (HierarchyResolver) throw abort; } } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); } return packageBinding.getType0(name); }
ReferenceBinding askForType(PackageBinding packageBinding, char[] name) { if (packageBinding == null) { packageBinding = this.defaultPackage; } NameEnvironmentAnswer answer = this.nameEnvironment.findType(name, packageBinding.compoundName); if (answer == null) return null; if (answer.isBinaryType()) { // the type was found as a .class file this.typeRequestor.accept(answer.getBinaryType(), packageBinding, answer.getAccessRestriction()); } else if (answer.isCompilationUnit()) { // the type was found as a .java file, try to build it then search the cache try { this.typeRequestor.accept(answer.getCompilationUnit(), answer.getAccessRestriction()); } catch (AbortCompilation abort) { if (CharOperation.equals(name, TypeConstants.PACKAGE_INFO_NAME)) return null; // silently, requestor may not be able to handle compilation units (HierarchyResolver) throw abort; } } else if (answer.isSourceType()) { // the type was found as a source model this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); } return packageBinding.getType0(name); }
this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); ReferenceBinding binding = packageBinding.getType0(name); String externalAnnotationPath = answer.getExternalAnnotationPath();
this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); ReferenceBinding binding = packageBinding.getType0(name); String externalAnnotationPath = answer.getExternalAnnotationPath();
this.typeRequestor.accept(answer.getSourceTypes(), packageBinding, answer.getAccessRestriction()); ReferenceBinding binding = packageBinding.getType0(name); String externalAnnotationPath = answer.getExternalAnnotationPath();
this.typeRequestor.accept(answer.getSourceTypes(), pkg, answer.getAccessRestriction()); ReferenceBinding binding = pkg.getType0(compoundName[compoundName.length - 1]); if (binding instanceof SourceTypeBinding) {
this.typeRequestor.accept(answer.getSourceTypes(), pkg, answer.getAccessRestriction()); ReferenceBinding binding = pkg.getType0(compoundName[compoundName.length - 1]); if (binding instanceof SourceTypeBinding) {