Package org.eclipse.sisu.space
Class BundleClassSpace
java.lang.Object
org.eclipse.sisu.space.BundleClassSpace
- All Implemented Interfaces:
ClassSpace
ClassSpace backed by a strongly-referenced Bundle.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeferLoadClass(String name) Defers loading of the named class from the surrounding class space.booleanfindEntries(String path, String glob, boolean recurse) Queries local class space content for entries matching the given pattern.org.osgi.framework.BundlegetResource(String name) Queries the surrounding class space for the resource with the given name.getResources(String name) Queries the surrounding class space for all resources with the given name.inthashCode()Class<?> Loads the named class from the surrounding class space.toString()
-
Constructor Details
-
BundleClassSpace
public BundleClassSpace(org.osgi.framework.Bundle bundle)
-
-
Method Details
-
loadClass
Description copied from interface:ClassSpaceLoads the named class from the surrounding class space.- Specified by:
loadClassin interfaceClassSpace- Parameters:
name- The class name- Returns:
- Class instance
- See Also:
-
deferLoadClass
Description copied from interface:ClassSpaceDefers loading of the named class from the surrounding class space.- Specified by:
deferLoadClassin interfaceClassSpace- Parameters:
name- The class name- Returns:
- Deferred class
- See Also:
-
getResource
Description copied from interface:ClassSpaceQueries the surrounding class space for the resource with the given name.- Specified by:
getResourcein interfaceClassSpace- Parameters:
name- The resource name- Returns:
- URL pointing to the resource;
nullif it wasn't found - See Also:
-
getResources
Description copied from interface:ClassSpaceQueries the surrounding class space for all resources with the given name.- Specified by:
getResourcesin interfaceClassSpace- Parameters:
name- The resource name- Returns:
- Sequence of URLs, one for each matching resource
- See Also:
-
findEntries
Description copied from interface:ClassSpaceQueries local class space content for entries matching the given pattern.- Specified by:
findEntriesin interfaceClassSpace- Parameters:
path- The initial search directory; for example"META-INF"glob- The filename glob pattern; for example"*.xml"recurse- Iftruerecurse into sub-directories; otherwise only search initial directory- Returns:
- Sequence of URLs, one for each matching entry
- See Also:
-
getBundle
public org.osgi.framework.Bundle getBundle() -
hashCode
public int hashCode() -
equals
-
toString
-