|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.classloading.plugins.visitor.AbstractResourceContext
public abstract class AbstractResourceContext
Abstract resource context. Doesn't take url - super class should impl getURL.
Constructor Summary | |
---|---|
AbstractResourceContext(String resourceName,
ClassLoader classLoader)
Create a new ResourceContext. |
Method Summary | |
---|---|
byte[] |
getBytes()
Get the bytes for the resource |
ClassLoader |
getClassLoader()
Get the classLoader. |
String |
getClassName()
Get the class name |
InputStream |
getInputStream()
Get the input stream for the resource |
String |
getResourceName()
Get the resourceName. |
boolean |
isClass()
Whether the resource is a class |
Class<?> |
loadClass()
Load a class Do isClass check before, unless you want to handle exception when resource is not actually a class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.classloading.spi.visitor.ResourceContext |
---|
getUrl |
Constructor Detail |
---|
public AbstractResourceContext(String resourceName, ClassLoader classLoader)
resourceName
- the resource nameclassLoader
- the classloaderMethod Detail |
---|
public ClassLoader getClassLoader()
getClassLoader
in interface ResourceContext
public String getResourceName()
getResourceName
in interface ResourceContext
public String getClassName()
getClassName
in interface ResourceContext
public boolean isClass()
isClass
in interface ResourceContext
public Class<?> loadClass()
loadClass
in interface ResourceContext
RuntimeException
- for any errors during class loadingpublic InputStream getInputStream() throws IOException
getInputStream
in interface ResourceContext
IOException
- for any errorpublic byte[] getBytes() throws IOException
getBytes
in interface ResourceContext
IOException
- for any error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |