Package org.openjdk.jmc.common.util
Class MCPackage
- java.lang.Object
-
- org.openjdk.jmc.common.util.MCPackage
-
- All Implemented Interfaces:
IDescribable,IMCPackage
public class MCPackage extends java.lang.Object implements IMCPackage, IDescribable
Base implementation of theIMCPackageinterface.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.BooleanisExportedprivate IMCModulemoduleprivate java.lang.Stringname
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetDescription()IMCModulegetModule()java.lang.StringgetName()Returns the package name.inthashCode()java.lang.BooleanisExported()java.lang.StringtoString()
-
-
-
Field Detail
-
name
private final java.lang.String name
-
module
private final IMCModule module
-
isExported
private final java.lang.Boolean isExported
-
-
Constructor Detail
-
MCPackage
MCPackage(java.lang.String name, IMCModule module, java.lang.Boolean isExported)Create a new package instance.- Parameters:
name- package namemodule- module that the package resides, ornullif it is in a pre-modules environmentisExported- If the package is exported by the module or not. Usetrueif it is in a pre-modules environment.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:IMCPackageReturns the package name.An example is "java.lang".
- Specified by:
getNamein interfaceIDescribable- Specified by:
getNamein interfaceIMCPackage- Returns:
- package name
-
getModule
public IMCModule getModule()
- Specified by:
getModulein interfaceIMCPackage- Returns:
- the module in which this package resides, or null if it's in a pre-modules environment
-
isExported
public java.lang.Boolean isExported()
- Specified by:
isExportedin interfaceIMCPackage- Returns:
trueif the package is exported from it's module, or if it's in a pre modules environment,falseotherwise
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceIDescribable- Returns:
- the description of this object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-