public class OSGiImportSearchPolicy extends ImportSearchPolicy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DYNAMIC_IMPORTS_ATTR
This is the name of the "dynamic-imports" meta-data attribute that
should be attached to each module.
|
EXPORTS_ATTR, IDENTIFIER_IDX, IMPORTS_ATTR, PROPAGATES_ATTR, RESOLVING_MODULE_IDX, VALID_ATTR, VERSION_IDX
Constructor and Description |
---|
OSGiImportSearchPolicy(Oscar oscar) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
findClass(Module module,
java.lang.String name)
This method is part of the SearchPolicy interface; it
should not be called directly.
|
protected java.lang.Class |
findClassDynamic(Module module,
java.lang.String name) |
java.net.URL |
findResource(Module module,
java.lang.String name)
This method is part of the SearchPolicy interface; it
should not be called directly.
|
protected java.net.URL |
findResourceDynamic(Module module,
java.lang.String name) |
static java.lang.String[] |
getDynamicImports(Module module)
Utility method that returns the DYNAMIC_IMPORTS_ATTR
attribute for the specified module.
|
addValidationListener, createImporterList, doesImport, fireModuleInvalidated, fireModuleValidated, getCompatibilityPolicy, getCompatibleModules, getExportResolvingModule, getExportsAttribute, getExportVersion, getImportResolvingModule, getImportsAttribute, getImportsOrExports, getImportVersion, getPropagatesAttribute, getSelectionPolicy, getValidAttribute, invalidate, moduleAdded, moduleRemoved, moduleReset, removeValidationListener, resolveImportTarget, setModuleManager, validate
public static final java.lang.String DYNAMIC_IMPORTS_ATTR
public OSGiImportSearchPolicy(Oscar oscar)
public java.lang.Class findClass(Module module, java.lang.String name) throws java.lang.ClassNotFoundException
ImportSearchPolicy
findClass
in interface SearchPolicy
findClass
in class ImportSearchPolicy
module
- the target module that is loading the class.name
- the name of the class being loaded.java.lang.ClassNotFoundException
- if the class could not be
found and the entire search operation should fail.public java.net.URL findResource(Module module, java.lang.String name) throws ResourceNotFoundException
ImportSearchPolicy
findResource
in interface SearchPolicy
findResource
in class ImportSearchPolicy
module
- the target module that is loading the resource.name
- the name of the resource being loaded.ResourceNotFoundException
- if the
resource could not be found and the entire search operation
should fail.protected java.lang.Class findClassDynamic(Module module, java.lang.String name)
protected java.net.URL findResourceDynamic(Module module, java.lang.String name)
public static java.lang.String[] getDynamicImports(Module module)
module
- the module whose DYNAMIC_IMPORTS_ATTR
attribute is to be retrieved.