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: //This file is part of KeY - Integrated Deductive Software Design
10: //Copyright (C) 2001-2003 Universitaet Karlsruhe, Germany
11: //and Chalmers University of Technology, Sweden
12: //
13: //The KeY system is protected by the GNU General Public License.
14: //See LICENSE.TXT for details.
15: //
16:
17: package de.uka.ilkd.key.logic;
18:
19: import de.uka.ilkd.key.java.NameAbstractionTable;
20: import de.uka.ilkd.key.java.PrettyPrinter;
21: import de.uka.ilkd.key.java.SourceElement;
22:
23: /** represents the logical name for an attribute with the containing
24: * class as an additional string
25: */
26:
27: public class AttributeElementName extends ProgramElementName {
28:
29: protected String containerString;
30:
31: /** create a new name
32: * @param name the name
33: */
34: public AttributeElementName(String name, String container) {
35: super (name);
36: containerString = container;
37: }
38:
39: public void prettyPrint(PrettyPrinter w) throws java.io.IOException {
40: w.printProgramElementName(this );
41: }
42:
43: /** equals modulo renaming is described in the corresponding
44: * comment in class SourceElement. The ProgramElementName has to
45: * check if an abstract name has been assigned and if, if both
46: * elements are assigned to the same name, otherwise the names
47: * have to be equal
48: */
49: public boolean equalsModRenaming(SourceElement se,
50: NameAbstractionTable nat) {
51: if (!(se instanceof AttributeElementName)) {
52: return false;
53: }
54: return nat.sameAbstractName(this, se);
55: }
56: }
|