|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.discovery.Resource
public class Resource
'Resource' located by discovery. Naming of methods becomes a real pain ('getClass()') so I've patterned this after ClassLoader... I think it works well as it will give users a point-of-reference.
| Field Summary | |
|---|---|
protected ClassLoader |
loader
|
protected String |
name
|
protected URL |
resource
|
| Constructor Summary | |
|---|---|
Resource(String resourceName,
URL resource,
ClassLoader loader)
Create a new Resource instance. |
|
| Method Summary | |
|---|---|
ClassLoader |
getClassLoader()
Get the value of loader. |
String |
getName()
Get the value of resourceName. |
URL |
getResource()
Get the value of URL. |
InputStream |
getResourceAsStream()
Get the value of URL. |
static Resource[] |
toArray(ResourceIterator iterator)
Returns an array containing all of the elements in this ResourceIterator in proper sequence. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final String name
protected final URL resource
protected final ClassLoader loader
| Constructor Detail |
|---|
public Resource(String resourceName,
URL resource,
ClassLoader loader)
Resource instance.
resourceName - The resource name has to be locatedresource - The resource URL has to be locatedloader - The class loader used to locate the given resource| Method Detail |
|---|
public String getName()
public URL getResource()
public InputStream getResourceAsStream()
public ClassLoader getClassLoader()
public String toString()
toString in class Objectpublic static Resource[] toArray(ResourceIterator iterator)
ResourceIterator in proper sequence.
iterator - The ResourceIterator containing the
ResourceIterator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||