protected PackageBinding findPackage(char[] name, ModuleBinding module) { // delegate to the module to consider the module graph: return module.getPackage(this.compoundName, name); } /* Answer the subpackage named name; ask the oracle for the package if its not in the cache.
protected PackageBinding findPackage(char[] name, ModuleBinding module) { // delegate to the module to consider the module graph: return module.getPackage(this.compoundName, name); } /* Answer the subpackage named name; ask the oracle for the package if its not in the cache.
@Override public PackageElement getPackageElement(ModuleElement module, CharSequence name) { ModuleBinding mBinding = ((ModuleElementImpl) module).binding; final char[][] compoundName = CharOperation.splitOn('.', name.toString().toCharArray()); PackageBinding p = null; if (mBinding != null) { int length = compoundName.length; if (length > 1) { char[][] parent = new char[compoundName.length - 1][]; System.arraycopy(compoundName, 0, parent, 0, length - 1); p = mBinding.getPackage(parent, compoundName[length - 1]); } else { p = mBinding.getTopLevelPackage(compoundName[0]); } } else { p = _env.getLookupEnvironment().createPackage(compoundName); } if (p == null || !p.isValidBinding()) return null; return (PackageElement) _env.getFactory().newElement(p); } }
ModuleBinding declaringModule = this.root.getModule(mod); if (declaringModule != null) packageBinding = SplitPackageBinding.combine(declaringModule.getPackage(parent.compoundName, constantPoolName[i]), packageBinding, this.module);
ModuleBinding declaringModule = this.root.getModule(mod); if (declaringModule != null) packageBinding = SplitPackageBinding.combine(declaringModule.getPackage(parent.compoundName, constantPoolName[i]), packageBinding, this.module);