Class Entry
- java.lang.Object
-
- org.codehaus.plexus.classworlds.realm.Entry
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.ClassLoader
classLoader
(package private) java.lang.String
pkgName
-
Constructor Summary
Constructors Constructor Description Entry(java.lang.ClassLoader realm, java.lang.String pkgName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Entry that)
Compare this entry to another for relative ordering.boolean
equals(java.lang.Object thatObj)
Test this entry for equality to another.(package private) java.lang.ClassLoader
getClassLoader()
Retrieve the class loader.(package private) java.lang.String
getPackageName()
Retrieve the package name.int
hashCode()
Consistent withequals(java.lang.Object)
, this method creates a hashCode based on the packagename.(package private) boolean
matches(java.lang.String name)
Determine if the class/resource name matches the package described by this entry.java.lang.String
toString()
-
-
-
Method Detail
-
getClassLoader
java.lang.ClassLoader getClassLoader()
Retrieve the class loader.- Returns:
- The class loader.
-
getPackageName
java.lang.String getPackageName()
Retrieve the package name.- Returns:
- The package name.
-
matches
boolean matches(java.lang.String name)
Determine if the class/resource name matches the package described by this entry.- Parameters:
name
- The class or resource name to test, must not benull
.- Returns:
true
if this entry matches the classname, otherwisefalse
.
-
compareTo
public int compareTo(Entry that)
Compare this entry to another for relative ordering. The natural ordering of Entry objects is reverse-alphabetical based upon package name.- Specified by:
compareTo
in interfacejava.lang.Comparable<Entry>
- Parameters:
thatObj
- The object to compare.- Returns:
- -1 if this object sorts before that object, 0 if they are equal, or 1 if this object sorts after that object.
-
equals
public boolean equals(java.lang.Object thatObj)
Test this entry for equality to another. Consistent withcompareTo(org.codehaus.plexus.classworlds.realm.Entry)
, this method tests for equality purely on the package name.- Overrides:
equals
in classjava.lang.Object
- Parameters:
thatObj
- The object to compare- Returns:
true
if the two objects are semantically equivalent, otherwisefalse
.
-
hashCode
public int hashCode()
Consistent withequals(java.lang.Object)
, this method creates a hashCode based on the packagename.- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-