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.declaration;
12:
13: import de.uka.ilkd.key.java.ProgramElement;
14: import de.uka.ilkd.key.java.abstraction.ListOfKeYJavaType;
15: import de.uka.ilkd.key.java.abstraction.SLListOfKeYJavaType;
16: import de.uka.ilkd.key.java.visitor.Visitor;
17: import de.uka.ilkd.key.logic.ProgramElementName;
18:
19: /**
20: * At the moment the mere purpose of this Class is to provide an encapsulation
21: * for the length attribute.
22: */
23: public class SuperArrayDeclaration extends TypeDeclaration {
24:
25: private FieldDeclaration length = null;
26:
27: private SuperArrayDeclaration(ProgramElementName name,
28: FieldDeclaration length) {
29: super (new Modifier[0], name, name,
30: new MemberDeclaration[] { length }, false, false);
31: this .length = length;
32: }
33:
34: public SuperArrayDeclaration(FieldDeclaration length) {
35: this (new ProgramElementName("SuperArray"), length);
36: }
37:
38: public int getChildCount() {
39: return 0;
40: }
41:
42: public boolean isInterface() {
43: return false;
44: }
45:
46: public FieldDeclaration length() {
47: return length;
48: }
49:
50: /**
51: * returns the local declared supertypes
52: */
53: public ListOfKeYJavaType getSupertypes() {
54: return SLListOfKeYJavaType.EMPTY_LIST;
55: }
56:
57: public ProgramElement getChildAt(int i) {
58: return null;
59: }
60:
61: /**
62: * calls the corresponding method of a visitor in order to
63: * perform some action/transformation on this element
64: * @param v the Visitor
65: */
66: public void visit(Visitor v) {
67: v.performActionOnSuperArrayDeclaration(this);
68: }
69:
70: }
|