001: // This file is part of KeY - Integrated Deductive Software Design
002: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
003: // Universitaet Koblenz-Landau, Germany
004: // Chalmers University of Technology, Sweden
005: //
006: // The KeY system is protected by the GNU General Public License.
007: // See LICENSE.TXT for details.
008: //
009: //
010:
011: package de.uka.ilkd.key.java.recoderext;
012:
013: import recoder.java.*;
014: import recoder.java.expression.Literal;
015: import recoder.java.reference.ReferencePrefix;
016: import recoder.java.reference.ReferenceSuffix;
017: import de.uka.ilkd.key.logic.op.SchemaVariable;
018:
019: public class ExpressionSVWrapper extends Literal implements Expression,
020: LoopInitializer, KeYRecoderExtension, SVWrapper,
021: ReferencePrefix {
022:
023: protected SchemaVariable sv;
024: protected ReferenceSuffix suff;
025:
026: protected StatementContainer statementParent = null;
027:
028: protected ExpressionSVWrapper(ExpressionSVWrapper proto) {
029: super (proto);
030: expressionParent = null;
031: }
032:
033: public ExpressionSVWrapper() {
034: expressionParent = null;
035: }
036:
037: public ExpressionSVWrapper(SchemaVariable sv) {
038: this .sv = sv;
039: expressionParent = null;
040: }
041:
042: /**
043: Make parent role valid.
044: */
045: public void makeParentRoleValid() {
046: }
047:
048: /**
049: Get AST parent.
050: @return the non terminal program element.
051: */
052: public NonTerminalProgramElement getASTParent() {
053: return expressionParent;
054: }
055:
056: /**
057: * sets the schema variable of sort statement
058: * @param sv the SchemaVariable
059: */
060: public void setSV(SchemaVariable sv) {
061: this .sv = sv;
062: }
063:
064: /**
065: * returns a String name of this meta construct.
066: */
067: public SchemaVariable getSV() {
068: return sv;
069: }
070:
071: /**
072: Get expression container.
073: @return the expression container.
074: */
075: public ExpressionContainer getExpressionContainer() {
076: return expressionParent;
077: }
078:
079: /**
080: Set expression container.
081: @param c an expression container.
082: */
083: public void setExpressionContainer(ExpressionContainer c) {
084: expressionParent = c;
085: }
086:
087: //don't think we need it
088: public void accept(SourceVisitor v) {
089: }
090:
091: public Object deepClone() {
092: return new StatementSVWrapper(sv);
093: }
094:
095: /**
096: Get statement container.
097: @return the statement container.
098: */
099: public StatementContainer getStatementContainer() {
100: return statementParent;
101: }
102:
103: /**
104: Set statement container.
105: @param c a statement container.
106: */
107: public void setStatementContainer(StatementContainer c) {
108: statementParent = c;
109: }
110:
111: public ReferenceSuffix getReferenceSuffix() {
112: return suff;
113: }
114:
115: /**
116: Set reference suffix.
117: @param path a reference suffix.
118: */
119: public void setReferenceSuffix(ReferenceSuffix path) {
120: suff = path;
121: }
122: }
|