Class MCPackage

java.lang.Object
org.openjdk.jmc.common.util.MCPackage
All Implemented Interfaces:
IDescribable, IMCPackage

public class MCPackage extends Object implements IMCPackage, IDescribable
Base implementation of the IMCPackage interface.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IMCPackage
      Returns the package name.

      An example is "java.lang".

      Specified by:
      getName in interface IDescribable
      Specified by:
      getName in interface IMCPackage
      Returns:
      package name
    • getModule

      public IMCModule getModule()
      Specified by:
      getModule in interface IMCPackage
      Returns:
      the module in which this package resides, or null if it's in a pre-modules environment
    • isExported

      public Boolean isExported()
      Specified by:
      isExported in interface IMCPackage
      Returns:
      true if the package is exported from it's module, or if it's in a pre modules environment, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface IDescribable
      Returns:
      the description of this object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object