|
||||||||||
| 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 classloader| Method Detail |
|---|
public ClassLoader getClassLoader()
getClassLoader in interface ResourceContextpublic String getResourceName()
getResourceName in interface ResourceContextpublic String getClassName()
getClassName in interface ResourceContextpublic boolean isClass()
isClass in interface ResourceContextpublic Class<?> loadClass()
loadClass in interface ResourceContextRuntimeException - for any errors during class loading
public InputStream getInputStream()
throws IOException
getInputStream in interface ResourceContextIOException - for any error
public byte[] getBytes()
throws IOException
getBytes in interface ResourceContextIOException - for any error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||