public ReferenceBinding setFocusType(char[][] compoundName) { if (compoundName == null || this.lookupEnvironment == null) return null; this.focusType = this.lookupEnvironment.getCachedType(compoundName); if (this.focusType == null) { this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType == null) { int length = compoundName.length; char[] typeName = compoundName[length-1]; int firstDollar = CharOperation.indexOf('$', typeName); if (firstDollar != -1) { compoundName[length-1] = CharOperation.subarray(typeName, 0, firstDollar); this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType != null) { char[][] memberTypeNames = CharOperation.splitOn('$', typeName, firstDollar+1, typeName.length); for (int i = 0; i < memberTypeNames.length; i++) { this.focusType = this.focusType.getMemberType(memberTypeNames[i]); } } } } } return this.focusType; } public boolean subOrSuperOfFocus(ReferenceBinding typeBinding) {
public ReferenceBinding setFocusType(char[][] compoundName) { if (compoundName == null || this.lookupEnvironment == null) return null; this.focusType = this.lookupEnvironment.getCachedType(compoundName); if (this.focusType == null) { this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType == null) { int length = compoundName.length; char[] typeName = compoundName[length-1]; int firstDollar = CharOperation.indexOf('$', typeName); if (firstDollar != -1) { compoundName[length-1] = CharOperation.subarray(typeName, 0, firstDollar); this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType != null) { char[][] memberTypeNames = CharOperation.splitOn('$', typeName, firstDollar+1, typeName.length); for (int i = 0; i < memberTypeNames.length; i++) { this.focusType = this.focusType.getMemberType(memberTypeNames[i]); if (this.focusType == null) return null; } } } } } return this.focusType; } public boolean subOrSuperOfFocus(ReferenceBinding typeBinding) {
public ReferenceBinding setFocusType(char[][] compoundName) { if (compoundName == null || this.lookupEnvironment == null) return null; this.focusType = this.lookupEnvironment.getCachedType(compoundName); if (this.focusType == null) { this.focusType = this.lookupEnvironment.askForType(compoundName, this.lookupEnvironment.UnNamedModule); if (this.focusType == null) { int length = compoundName.length; char[] typeName = compoundName[length-1]; int firstDollar = CharOperation.indexOf('$', typeName); if (firstDollar != -1) { compoundName[length-1] = CharOperation.subarray(typeName, 0, firstDollar); this.focusType = this.lookupEnvironment.askForType(compoundName, this.lookupEnvironment.UnNamedModule); if (this.focusType != null) { char[][] memberTypeNames = CharOperation.splitOn('$', typeName, firstDollar+1, typeName.length); for (int i = 0; i < memberTypeNames.length; i++) { this.focusType = this.focusType.getMemberType(memberTypeNames[i]); if (this.focusType == null) return null; } } } } } return this.focusType; } public boolean subOrSuperOfFocus(ReferenceBinding typeBinding) {
public ReferenceBinding setFocusType(char[][] compoundName) { if (compoundName == null || this.lookupEnvironment == null) return null; this.focusType = this.lookupEnvironment.getCachedType(compoundName); if (this.focusType == null) { this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType == null) { int length = compoundName.length; char[] typeName = compoundName[length-1]; int firstDollar = CharOperation.indexOf('$', typeName); if (firstDollar != -1) { compoundName[length-1] = CharOperation.subarray(typeName, 0, firstDollar); this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType != null) { char[][] memberTypeNames = CharOperation.splitOn('$', typeName, firstDollar+1, typeName.length); for (int i = 0; i < memberTypeNames.length; i++) { this.focusType = this.focusType.getMemberType(memberTypeNames[i]); if (this.focusType == null) return null; } } } } } return this.focusType; } public boolean subOrSuperOfFocus(ReferenceBinding typeBinding) {
public ReferenceBinding setFocusType(char[][] compoundName) { if (compoundName == null || this.lookupEnvironment == null) return null; this.focusType = this.lookupEnvironment.getCachedType(compoundName); if (this.focusType == null) { this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType == null) { int length = compoundName.length; char[] typeName = compoundName[length-1]; int firstDollar = CharOperation.indexOf('$', typeName); if (firstDollar != -1) { compoundName[length-1] = CharOperation.subarray(typeName, 0, firstDollar); this.focusType = this.lookupEnvironment.askForType(compoundName); if (this.focusType != null) { char[][] memberTypeNames = CharOperation.splitOn('$', typeName, firstDollar+1, typeName.length); for (int i = 0; i < memberTypeNames.length; i++) { this.focusType = this.focusType.getMemberType(memberTypeNames[i]); if (this.focusType == null) return null; } } } } } return this.focusType; } public boolean subOrSuperOfFocus(ReferenceBinding typeBinding) {
public ReferenceBinding setFocusType(char[][] compoundName) { if (compoundName == null || this.lookupEnvironment == null) return null; this.focusType = this.lookupEnvironment.getCachedType(compoundName); if (this.focusType == null) { this.focusType = this.lookupEnvironment.askForType(compoundName, this.lookupEnvironment.UnNamedModule); if (this.focusType == null) { int length = compoundName.length; char[] typeName = compoundName[length-1]; int firstDollar = CharOperation.indexOf('$', typeName); if (firstDollar != -1) { compoundName[length-1] = CharOperation.subarray(typeName, 0, firstDollar); this.focusType = this.lookupEnvironment.askForType(compoundName, this.lookupEnvironment.UnNamedModule); if (this.focusType != null) { char[][] memberTypeNames = CharOperation.splitOn('$', typeName, firstDollar+1, typeName.length); for (int i = 0; i < memberTypeNames.length; i++) { this.focusType = this.focusType.getMemberType(memberTypeNames[i]); if (this.focusType == null) return null; } } } } } return this.focusType; } public boolean subOrSuperOfFocus(ReferenceBinding typeBinding) {
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding resolve(LookupEnvironment environment, boolean convertGenericToRawType) { ReferenceBinding targetType = this.resolvedType; if (targetType == null) { targetType = this.fPackage.getType0(this.compoundName[this.compoundName.length - 1]); if (targetType == this) { targetType = environment.askForType(this.compoundName); } if (targetType == null || targetType == this) { // could not resolve any better, error was already reported against it // report the missing class file first - only if not resolving a previously missing type if ((this.tagBits & TagBits.HasMissingType) == 0 && !environment.mayTolerateMissingType) { environment.problemReporter.isClassPathCorrect( this.compoundName, environment.unitBeingCompleted, environment.missingClassFileLocation); } // create a proxy for the missing BinaryType targetType = environment.createMissingType(null, this.compoundName); } setResolvedType(targetType, environment); } if (convertGenericToRawType) { targetType = (ReferenceBinding) environment.convertUnresolvedBinaryToRawType(targetType); } return targetType; } void setResolvedType(ReferenceBinding targetType, LookupEnvironment environment) {
ReferenceBinding resolve(LookupEnvironment environment, boolean convertGenericToRawType) { ReferenceBinding targetType = this.resolvedType; if (targetType == null) { targetType = this.fPackage.getType0(this.compoundName[this.compoundName.length - 1]); if (targetType == this) { targetType = environment.askForType(this.compoundName); } if (targetType == null || targetType == this) { // could not resolve any better, error was already reported against it // report the missing class file first - only if not resolving a previously missing type if ((this.tagBits & TagBits.HasMissingType) == 0) { environment.problemReporter.isClassPathCorrect( this.compoundName, environment.unitBeingCompleted, environment.missingClassFileLocation); } // create a proxy for the missing BinaryType targetType = environment.createMissingType(null, this.compoundName); } setResolvedType(targetType, environment); } if (convertGenericToRawType) { targetType = (ReferenceBinding) environment.convertUnresolvedBinaryToRawType(targetType); } return targetType; } void setResolvedType(ReferenceBinding targetType, LookupEnvironment environment) {
ReferenceBinding resolve(LookupEnvironment environment, boolean convertGenericToRawType) { ReferenceBinding targetType = this.resolvedType; if (targetType == null) { targetType = this.fPackage.getType0(this.compoundName[this.compoundName.length - 1]); if (targetType == this) { targetType = environment.askForType(this.compoundName); } if (targetType == null || targetType == this) { // could not resolve any better, error was already reported against it // report the missing class file first - only if not resolving a previously missing type if ((this.tagBits & TagBits.HasMissingType) == 0) { environment.problemReporter.isClassPathCorrect( this.compoundName, environment.unitBeingCompleted, environment.missingClassFileLocation); } // create a proxy for the missing BinaryType targetType = environment.createMissingType(null, this.compoundName); } setResolvedType(targetType, environment); } if (convertGenericToRawType) { targetType = (ReferenceBinding) environment.convertUnresolvedBinaryToRawType(targetType); } return targetType; } void setResolvedType(ReferenceBinding targetType, LookupEnvironment environment) {
ReferenceBinding getType(char[] name, ModuleBinding mod) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name, mod)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); if (!mod.canAccess(this)) return new ProblemReferenceBinding(referenceBinding.compoundName, referenceBinding, ProblemReasons.NotAccessible); // at this point we have only checked accessibility of the package, accessibility of the type will be checked by callers return referenceBinding; } /* Answer the type named name if it exists in the cache.
ReferenceBinding getType(char[] name, ModuleBinding mod) { ReferenceBinding referenceBinding = getType0(name); if (referenceBinding == null) { if ((referenceBinding = this.environment.askForType(this, name, mod)) == null) { // not found so remember a problem type binding in the cache for future lookups addNotFoundType(name); return null; } } if (referenceBinding == LookupEnvironment.TheNotFoundType) return null; referenceBinding = (ReferenceBinding) BinaryTypeBinding.resolveType(referenceBinding, this.environment, false /* no raw conversion for now */); if (referenceBinding.isNestedType()) return new ProblemReferenceBinding(new char[][]{ name }, referenceBinding, ProblemReasons.InternalNameProvided); if (!mod.canAccess(this)) return new ProblemReferenceBinding(referenceBinding.compoundName, referenceBinding, ProblemReasons.NotAccessible); // at this point we have only checked accessibility of the package, accessibility of the type will be checked by callers return referenceBinding; } /* Answer the type named name if it exists in the cache.