public final class BundleClassSpace extends Object implements ClassSpace
ClassSpace
backed by a strongly-referenced Bundle
.Constructor and Description |
---|
BundleClassSpace(org.osgi.framework.Bundle bundle) |
Modifier and Type | Method and Description |
---|---|
DeferredClass<?> |
deferLoadClass(String name)
Defers loading of the named class from the surrounding class space.
|
boolean |
equals(Object rhs) |
Enumeration<URL> |
findEntries(String path,
String glob,
boolean recurse)
Queries local class space content for entries matching the given pattern.
|
URL |
getResource(String name)
Queries the surrounding class space for the resource with the given name.
|
Enumeration<URL> |
getResources(String name)
Queries the surrounding class space for all resources with the given name.
|
int |
hashCode() |
Class<?> |
loadClass(String name)
Loads the named class from the surrounding class space.
|
String |
toString() |
public Class<?> loadClass(String name)
ClassSpace
loadClass
in interface ClassSpace
name
- The class nameClassLoader.loadClass(String)
public DeferredClass<?> deferLoadClass(String name)
ClassSpace
deferLoadClass
in interface ClassSpace
name
- The class nameClassLoader.loadClass(String)
public URL getResource(String name)
ClassSpace
getResource
in interface ClassSpace
name
- The resource namenull
if it wasn't foundClassLoader.getResource(String)
public Enumeration<URL> getResources(String name)
ClassSpace
getResources
in interface ClassSpace
name
- The resource nameClassLoader.getResources(String)
public Enumeration<URL> findEntries(String path, String glob, boolean recurse)
ClassSpace
findEntries
in interface ClassSpace
path
- The initial search directory; for example "META-INF"
glob
- The filename glob pattern; for example "*.xml"
recurse
- If true
recurse into sub-directories; otherwise only search initial directoryBundle.findEntries(String, String, boolean)
Copyright © 2010-2015 Sonatype, Inc.. All Rights Reserved.