|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonatype.guice.bean.reflect.BundleClassSpace
public final class BundleClassSpace
ClassSpace backed by a strongly-referenced Bundle.
| Constructor Summary | |
|---|---|
BundleClassSpace(org.osgi.framework.Bundle bundle)
|
|
| Method Summary | |
|---|---|
DeferredClass<?> |
deferLoadClass(java.lang.String name)
Defers loading of the named class from the surrounding class space. |
boolean |
equals(java.lang.Object rhs)
|
java.util.Enumeration<java.net.URL> |
findEntries(java.lang.String path,
java.lang.String glob,
boolean recurse)
Queries local class space content for entries matching the given pattern. |
java.net.URL |
getResource(java.lang.String name)
Queries the surrounding class space for the resource with the given name. |
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name)
Queries the surrounding class space for all resources with the given name. |
int |
hashCode()
|
java.lang.Class<?> |
loadClass(java.lang.String name)
Loads the named class from the surrounding class space. |
boolean |
loadedClass(java.lang.Class<?> clazz)
Determines whether the given class was loaded by this particular class space. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BundleClassSpace(org.osgi.framework.Bundle bundle)
| Method Detail |
|---|
public java.lang.Class<?> loadClass(java.lang.String name)
ClassSpace
loadClass in interface ClassSpacename - The class name
ClassLoader.loadClass(String)public DeferredClass<?> deferLoadClass(java.lang.String name)
ClassSpace
deferLoadClass in interface ClassSpacename - The class name
ClassLoader.loadClass(String)public java.net.URL getResource(java.lang.String name)
ClassSpace
getResource in interface ClassSpacename - The resource name
null if it wasn't foundClassLoader.getResource(String)public java.util.Enumeration<java.net.URL> getResources(java.lang.String name)
ClassSpace
getResources in interface ClassSpacename - The resource name
ClassLoader.getResources(String)
public java.util.Enumeration<java.net.URL> findEntries(java.lang.String path,
java.lang.String glob,
boolean recurse)
ClassSpace
findEntries in interface ClassSpacepath - 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 directory
Bundle.findEntries(String, String, boolean)public boolean loadedClass(java.lang.Class<?> clazz)
ClassSpace
loadedClass in interface ClassSpaceclazz - The class
true if this space loaded the class; otherwise falsepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object rhs)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||