|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclasspathhelper.ContentDescription
In 1.0
versions of Classpath Helper all references to
other objects where handled as strings. This prevented deep loading by
allowing name based handles to an object.
In 1.1
and later CGClassLoader
supports the
CGClassLoader.getResource(String)
} methods. This means we have
multiple types of content that can be retrieved from a class loader.
We have classes
which are displayed in one format, and
resources
which are described in a relative path format.
If we continued to use strings to identify components then all clients
would need to inspect the string to try to determine what type of object
it is. To prevent this we create this description class to
represent generic content. It's subclass ClassDescription
defines
class based content. This allows clients to use the toString()
method
correctly display the name, while also have classified references.
In most cases clients will use the
contentDescription.toString();
contentDescription.getPackageName();
methods.
TODO: In the future CGClassLoader will have a generic getContentDetail method
whilch will accept subclasses of ContentDescription and return the correct detail
object. Fix this Java doc when that is completed.
Constructor Summary | |
ContentDescription(java.lang.String thePath,
SessionCache theSessionCache)
The path to this content (forward slashes only.) |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getName()
The name (not including package) |
java.lang.String |
getPackageName()
The package name for this content. |
java.lang.String |
getPath()
Retrieve the path to this object. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ContentDescription(java.lang.String thePath, SessionCache theSessionCache)
thePath
- The path.theSessionCache
- The cache to pull package info from.Method Detail |
public java.lang.String getName()
public java.lang.String getPath()
public java.lang.String getPackageName()
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |