Class Package


  • public final class Package
    extends Object
    Represents a Package of a model class, no matter whether Effect or Component. Created: Tue Apr 19 13:47:17 2005
    Version:
    1.0
    Author:
    Ernst Reissner
    • Field Detail

      • BUILD_IN

        public static final Package BUILD_IN
        The constant for the build-in-package, i.e. the package containing the built-in classes. Note that it is named _BuiltInPackage starting with an underscore which distinguishes it from all packages in a library.
      • name

        private final String name
        The name of this package.
      • superPackage

        private final Package superPackage
        The unique package containing this one. This is null exactly for BUILD_IN and for ROOT.
      • subPackages

        private final Map<String,​Package> subPackages
        Maps the names of the subPackages to the subPackages.
    • Constructor Detail

      • Package

        private Package​(String name,
                        Package superPackage)
    • Method Detail

      • getName

        String getName()
        Returns the name of this package.
        Returns:
        the name of this package as a String.
      • getPathName

        public String getPathName()
      • getPath

        public List<String> getPath()
        Returns the path of this package. This is intended for use within a library hierarchy.
        Returns:
        the path of this package starting with the name of the outermost package. This excludes the names of BUILD_IN and for ROOT. These are the only packages with an empty path. For all other packages, the path includes the name of this package.
      • addName

        private void addName​(List<String> path)
      • getSuperPackage

        Package getSuperPackage()
        Returns the enclosing package of this package.
        Returns:
        the enclosing package of this package. This is null exactly for BUILD_IN and for ROOT.
      • getPackage

        public static Package getPackage​(List<String> path)
        Returns the Package with the given path. Note that this yields only sub-packages of ROOT no BuiltIn's.
        Returns:
        the Package with the given path. Note that the result is exactly the same with respect to == for equal parameters.