Class MCPackage

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Boolean isExported  
      private IMCModule module  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      MCPackage​(java.lang.String name, IMCModule module, java.lang.Boolean isExported)
      Create a new package instance.
    • Field Detail

      • name

        private final java.lang.String name
      • 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 name
        module - module that the package resides, or null if it is in a pre-modules environment
        isExported - If the package is exported by the module or not. Use true if it is in a pre-modules environment.
    • Method Detail

      • getName

        public java.lang.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 java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDescription

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object