@Override PackageBinding getPackage0Any(char[] name) { PackageBinding knownPackage = super.getPackage0(name); if (knownPackage != null) return knownPackage; PackageBinding candidate = null; for (PackageBinding incarnation : this.incarnations) { PackageBinding package0 = incarnation.getPackage0(name); if (package0 == null) continue; candidate = combine(package0, candidate, this.enclosingModule); } // don't cache the result, maybe incomplete return candidate; }
@Override PackageBinding getPackage0Any(char[] name) { PackageBinding knownPackage = super.getPackage0(name); if (knownPackage != null) return knownPackage; PackageBinding candidate = null; for (PackageBinding incarnation : this.incarnations) { PackageBinding package0 = incarnation.getPackage0(name); if (package0 == null) continue; candidate = combine(package0, candidate, this.enclosingModule); } // don't cache the result, maybe incomplete return candidate; }
@Override PackageBinding getPackage0(char[] name) { PackageBinding knownPackage = super.getPackage0(name); if (knownPackage != null) return knownPackage; PackageBinding candidate = null; for (PackageBinding incarnation : this.incarnations) { PackageBinding package0 = incarnation.getPackage0(name); if (package0 == null) return null; // if any incarnation lacks cached info, a full findPackage will be necessary candidate = combine(package0, candidate, this.enclosingModule); } if (candidate != null) this.knownPackages.put(name, candidate); return candidate; }
@Override PackageBinding getPackage0(char[] name) { PackageBinding knownPackage = super.getPackage0(name); if (knownPackage != null) return knownPackage; PackageBinding candidate = null; for (PackageBinding incarnation : this.incarnations) { PackageBinding package0 = incarnation.getPackage0(name); if (package0 == null) return null; // if any incarnation lacks cached info, a full findPackage will be necessary candidate = combine(package0, candidate, this.enclosingModule); } if (candidate != null) this.knownPackages.put(name, candidate); return candidate; }
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name, ModuleBinding mod) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name, mod)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /** Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name, ModuleBinding mod) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name, mod)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /** Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
PackageBinding getPackage(char[] name) { PackageBinding binding = getPackage0(name); if (binding != null) { if (binding == LookupEnvironment.TheNotFoundPackage) return null; else return binding; } if ((binding = findPackage(name)) != null) return binding; // not found so remember a problem package binding in the cache for future lookups addNotFoundPackage(name); return null; } /* Answer the subpackage named name if it exists in the cache.
/** * Answer the type for the compoundName if it exists in the cache. * Answer theNotFoundType if it could not be resolved the first time * it was looked up, otherwise answer null. * * NOTE: Do not use for nested types... the answer is NOT the same for a.b.C or a.b.C.D.E * assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer. */ public ReferenceBinding getCachedType(char[][] compoundName) { if (compoundName.length == 1) { return this.defaultPackage.getType0(compoundName[0]); } PackageBinding packageBinding = getPackage0(compoundName[0]); if (packageBinding == null || packageBinding == TheNotFoundPackage) return null; for (int i = 1, packageLength = compoundName.length - 1; i < packageLength; i++) if ((packageBinding = packageBinding.getPackage0(compoundName[i])) == null || packageBinding == TheNotFoundPackage) return null; return packageBinding.getType0(compoundName[compoundName.length - 1]); }
/** * Answer the type for the compoundName if it exists in the cache. * Answer theNotFoundType if it could not be resolved the first time * it was looked up, otherwise answer null. * * NOTE: Do not use for nested types... the answer is NOT the same for a.b.C or a.b.C.D.E * assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer. */ public ReferenceBinding getCachedType(char[][] compoundName) { if (compoundName.length == 1) { return this.defaultPackage.getType0(compoundName[0]); } PackageBinding packageBinding = getPackage0(compoundName[0]); if (packageBinding == null || packageBinding == TheNotFoundPackage) return null; for (int i = 1, packageLength = compoundName.length - 1; i < packageLength; i++) if ((packageBinding = packageBinding.getPackage0(compoundName[i])) == null || packageBinding == TheNotFoundPackage) return null; return packageBinding.getType0(compoundName[compoundName.length - 1]); }
/** * Answer the type for the compoundName if it exists in the cache. * Answer theNotFoundType if it could not be resolved the first time * it was looked up, otherwise answer null. * * NOTE: Do not use for nested types... the answer is NOT the same for a.b.C or a.b.C.D.E * assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer. */ public ReferenceBinding getCachedType(char[][] compoundName) { if (compoundName.length == 1) { return this.defaultPackage.getType0(compoundName[0]); } PackageBinding packageBinding = getPackage0(compoundName[0]); if (packageBinding == null || packageBinding == TheNotFoundPackage) return null; for (int i = 1, packageLength = compoundName.length - 1; i < packageLength; i++) if ((packageBinding = packageBinding.getPackage0(compoundName[i])) == null || packageBinding == TheNotFoundPackage) return null; return packageBinding.getType0(compoundName[compoundName.length - 1]); }
/** * Answer the type for the compoundName if it exists in the cache. * Answer theNotFoundType if it could not be resolved the first time * it was looked up, otherwise answer null. * * NOTE: Do not use for nested types... the answer is NOT the same for a.b.C or a.b.C.D.E * assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer. */ public ReferenceBinding getCachedType(char[][] compoundName) { if (compoundName.length == 1) { return this.defaultPackage.getType0(compoundName[0]); } PackageBinding packageBinding = getPackage0(compoundName[0]); if (packageBinding == null || packageBinding == TheNotFoundPackage) return null; for (int i = 1, packageLength = compoundName.length - 1; i < packageLength; i++) if ((packageBinding = packageBinding.getPackage0(compoundName[i])) == null || packageBinding == TheNotFoundPackage) return null; return packageBinding.getType0(compoundName[compoundName.length - 1]); }
/** * Answer the type for the compoundName if it exists in the cache. * Answer theNotFoundType if it could not be resolved the first time * it was looked up, otherwise answer null. * * NOTE: Do not use for nested types... the answer is NOT the same for a.b.C or a.b.C.D.E * assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer. */ public ReferenceBinding getCachedType(char[][] compoundName) { if (compoundName.length == 1) { return this.defaultPackage.getType0(compoundName[0]); } PackageBinding packageBinding = getPackage0(compoundName[0]); if (packageBinding == null || packageBinding == TheNotFoundPackage) return null; for (int i = 1, packageLength = compoundName.length - 1; i < packageLength; i++) if ((packageBinding = packageBinding.getPackage0(compoundName[i])) == null || packageBinding == TheNotFoundPackage) return null; return packageBinding.getType0(compoundName[compoundName.length - 1]); }