Package eu.simuline.relana.model
Class Package
- java.lang.Object
-
- eu.simuline.relana.model.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 Summary
Fields Modifier and Type Field Description static Package
BUILD_IN
The constant for the build-in-package, i.e. the package containing the built-in classes.private String
name
The name of this package.(package private) static Package
ROOT
private Map<String,Package>
subPackages
Maps the names of the subPackages to the subPackages.private Package
superPackage
The unique package containing this one.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addName(List<String> path)
(package private) Package
addSubPackage(String name)
(package private) String
getName()
Returns the name of this package.static Package
getPackage(List<String> path)
Returns thePackage
with the given path.List<String>
getPath()
Returns the path of this package.String
getPathName()
(package private) Package
getSuperPackage()
Returns the enclosing package of this package.(package private) Package
subPackage(String name)
String
toString()
-
-
-
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.
-
ROOT
static final Package ROOT
-
name
private final String name
The name of this package.
-
superPackage
private final 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.
-
getSuperPackage
Package getSuperPackage()
Returns the enclosing package of this package.
-
getPackage
public static Package getPackage(List<String> path)
Returns thePackage
with the given path. Note that this yields only sub-packages ofROOT
no BuiltIn's.- Returns:
- the
Package
with the given path. Note that the result is exactly the same with respect to==
for equal parameters.
-
-