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: package de.uka.ilkd.key.rule.inst;
11:
12: import de.uka.ilkd.key.logic.op.Operator;
13: import de.uka.ilkd.key.logic.op.SchemaVariable;
14:
15: /** This class is used to store the instantiation of a schemavarible
16: * if it is an operator.
17: */
18:
19: public class OperatorInstantiation extends InstantiationEntry {
20:
21: /** the term the schemavariable is instantiated with */
22: private final Operator op;
23:
24: /** creates a new ContextInstantiationEntry
25: * @param sv the SchemaVariable that is
26: * instantiated
27: * @param op the Operator the SchemaVariable is instantiated with
28: */
29: OperatorInstantiation(SchemaVariable sv, Operator op) {
30: super (sv);
31: this .op = op;
32: }
33:
34: /** returns the Operator the SchemaVariable is instantiated with
35: * @return the Operator the SchemaVariable is instantiated with
36: */
37: public Operator getOperator() {
38: return op;
39: }
40:
41: /** returns the instantiation of the SchemaVariable
42: * @return the instantiation of the SchemaVariable
43: */
44: public Object getInstantiation() {
45: return op;
46: }
47:
48: /** toString */
49: public String toString() {
50: return "[" + getSchemaVariable() + ", " + getOperator() + "]";
51: }
52:
53: }
|