/** * Get the export all for the module * * @return the export all */ public ExportAll getExportAll() { return getMetadata().getExportAll(); }
/** * Get delegate policy * * @return the delegation policy */ public ParentPolicy getParentPolicy() { if (getMetadata().isJ2seClassLoadingCompliance()) return ParentPolicy.BEFORE; else return ParentPolicy.AFTER; }
/** * Get the import all for the module * * @return the import all */ public boolean isImportAll() { return getMetadata().isImportAll(); }
/** * Get the parentDomain. * * @return the parentDomain. */ public String getParentDomain() { String parentDomain = getMetadata().getParentDomain(); if (parentDomain == null) { if (ClassLoaderSystem.DEFAULT_DOMAIN_NAME.equals(getDomainName()) == false) return ClassLoaderSystem.DEFAULT_DOMAIN_NAME; } return parentDomain; }
/** * Resolve the requirement * * @param controller the controller * @param module the module * @param requirement the requirement * @return the resolved name or null if not resolved */ protected Object resolve(Controller controller, Module module, Requirement requirement) { // TODO JBMICROCONT-182 - do this properly for (Module other : units.values()) { ClassLoaderMetaData metadata = other.getMetadata(); List<Capability> capabilities = metadata.getCapabilities(); if (capabilities != null) { for (Capability capability : capabilities) { if (capability.resolves(module.getDeploymentUnit(), requirement)) return other.getName(); } } } return null; }