01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.java.abstraction;
12:
13: /**
14: A program model element representing packages.
15: @author AL
16: @author RN
17: */
18: public class Package implements ClassTypeContainer {
19:
20: private String name;
21:
22: /**
23: Creates a new package with the given name, organized by
24: the given program model info.
25: @param name the name of the package.
26: */
27: public Package(String name) {
28: this .name = name;
29: }
30:
31: /**
32: Returns the name of this package.
33: @return the name of this package.
34: */
35: public String getName() {
36: return name;
37: }
38:
39: /**
40: Returns the name of this package.
41: @return the full name of this program model element.
42: */
43: public String getFullName() {
44: return getName();
45: }
46:
47: /**
48: Returns the enclosing package or class type, or method.
49: @return <CODE>null</CODE>.
50: */
51: public ClassTypeContainer getContainer() {
52: return null;
53: }
54:
55: /**
56: Returns the enclosing package.
57: @return <CODE>null</CODE>.
58: */
59: public Package getPackage() {
60: return this;
61: }
62:
63: }
|