|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.jcr.classloader.internal.ClassPathEntry
public final class ClassPathEntry
The ClassPathEntry
class encapsulates entries in the class path
of the DynamicRepositoryClassLoader
. The main task is to retrieve
ClassLoaderResource
instances for classes or resources to load from it.
This implementation is not currently integrated with Java security. That is protection domains and security managers are not supported yet.
This class is not intended to be subclassed or instantiated by clients.
Field Summary | |
---|---|
protected URL |
baseURL
The base URL for the class path entry to later construct resource URLs |
protected String |
path
The path to the item of this class path entry |
protected javax.jcr.Session |
session
The session assigned to this class path entry |
Constructor Summary | |
---|---|
protected |
ClassPathEntry(ClassPathEntry base)
Clones this instance of the ClassPathEntry setting the
path and session to the same value as the base instance. |
protected |
ClassPathEntry(javax.jcr.Session session,
String path)
Creates an instance of the ClassPathEntry assigning the
session and path. |
Method Summary | |
---|---|
String |
getPath()
Returns the path on which this ClassPathEntry is based. |
org.apache.sling.jcr.classloader.internal.ClassLoaderResource |
getResource(String name)
Returns a ClassLoaderResource for the named resource if it
can befound below this directory root identified by the path given
at construction time. |
String |
toString()
|
URL |
toURL()
Returns this ClassPathEntry represented as an URL to be
used in a list of URLs to further work on. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final javax.jcr.Session session
protected final String path
protected URL baseURL
Constructor Detail |
---|
protected ClassPathEntry(javax.jcr.Session session, String path)
ClassPathEntry
assigning the
session and path.
session
- The Session
to access the Repository.path
- The path of the class path entry, this is either the
path of a node containing a jar archive or is the path
of the root of a hierarchy to look up resources in.protected ClassPathEntry(ClassPathEntry base)
ClassPathEntry
setting the
path and session to the same value as the base instance.
Note that this constructor does not duplicate the session from the base instance.
base
- The ClassPathEntry
from which to copy the path
and the session.Method Detail |
---|
public String getPath()
ClassPathEntry
is based.
public URL toURL()
ClassPathEntry
represented as an URL to be
used in a list of URLs to further work on. If there is a problem creating
the URL for this instance, null
is returned instead.
public org.apache.sling.jcr.classloader.internal.ClassLoaderResource getResource(String name)
ClassLoaderResource
for the named resource if it
can befound below this directory root identified by the path given
at construction time. Note that if the page would exist but does
either not contain content or is not readable by the current session,
no resource is returned.
name
- The name of the resource to return. If the resource would
be a class the name must already be modified to denote a valid
path, that is dots replaced by dashes and the .class
extension attached.
ClassLoaderResource
identified by the name or
null
if no resource is found for that name.public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |