|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.peaseplate.locator.AbstractLocator
org.peaseplate.locator.AbstractURLBasedLocator
org.peaseplate.internal.locator.AbstractClassLoaderLocator
public abstract class AbstractClassLoaderLocator
An abstract implementation of a locator that is based on the class loader
| Constructor Summary | |
|---|---|
AbstractClassLoaderLocator(java.net.URL url,
java.lang.String resource,
ResourceKey key)
Creates the class loader locator |
|
AbstractClassLoaderLocator(java.net.URL url,
java.lang.String resource,
java.lang.String name,
java.util.Locale locale,
java.lang.String encoding)
Creates the class loader locator |
|
| Method Summary | |
|---|---|
java.lang.String |
getResource()
Returns the resource this locator is based on |
protected static java.net.URL |
getResource(java.util.Collection<java.lang.ClassLoader> classLoaders,
java.lang.String path)
Searches for the resource in the class loaders and returns the url if found |
protected static java.lang.String |
toCannonical(java.lang.String path)
Converts the path to a connonical form (without ../ and ./) |
java.lang.String |
toString()
A meaningful representation of the locator, mainly used for textual output e.g. in error messages |
| Methods inherited from class org.peaseplate.locator.AbstractURLBasedLocator |
|---|
getUrl, isOutdated, updateMetadata |
| Methods inherited from class org.peaseplate.locator.AbstractLocator |
|---|
getKey, getRawSize, getTimestamp, setRawSize, setTimestamp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractClassLoaderLocator(java.net.URL url,
java.lang.String resource,
java.lang.String name,
java.util.Locale locale,
java.lang.String encoding)
throws java.lang.IllegalArgumentException
url - the urlpath - the pathname - the namelocale - the localeencoding - the encoding
java.lang.IllegalArgumentException - if the path or the name is null
public AbstractClassLoaderLocator(java.net.URL url,
java.lang.String resource,
ResourceKey key)
throws java.lang.IllegalArgumentException
url - the urlpath - the pathkey - the key
java.lang.IllegalArgumentException - if the path or the key is null| Method Detail |
|---|
public java.lang.String getResource()
public java.lang.String toString()
Locator
toString in interface LocatortoString in class AbstractURLBasedLocatorObject.toString()protected static java.lang.String toCannonical(java.lang.String path)
path - the path
protected static java.net.URL getResource(java.util.Collection<java.lang.ClassLoader> classLoaders,
java.lang.String path)
throws java.lang.IllegalArgumentException
classLoaders - the class loaders to searchpath - the path to the resource
java.lang.IllegalArgumentException - if the path is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||