Class Entry

  • All Implemented Interfaces:
    java.lang.Comparable<Entry>

    class Entry
    extends java.lang.Object
    implements java.lang.Comparable<Entry>
    Import description 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 with equals(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()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • classLoader

        final java.lang.ClassLoader classLoader
      • pkgName

        final java.lang.String pkgName
    • Constructor Detail

      • Entry

        Entry​(java.lang.ClassLoader realm,
              java.lang.String pkgName)
    • 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 be null.
        Returns:
        true if this entry matches the classname, otherwise false.
      • 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 interface java.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 with compareTo(org.codehaus.plexus.classworlds.realm.Entry), this method tests for equality purely on the package name.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        thatObj - The object to compare
        Returns:
        true if the two objects are semantically equivalent, otherwise false.
      • hashCode

        public int hashCode()

        Consistent with equals(java.lang.Object), this method creates a hashCode based on the packagename.

        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object