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.java.ProgramElement;
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 a ProgramElement.
17: */
18:
19: public class ProgramInstantiation extends InstantiationEntry {
20:
21: /** the pe the schemavariable is instantiated with */
22: private final ProgramElement pe;
23:
24: /** creates a new ContextInstantiationEntry
25: * @param sv the SchemaVariable that is
26: * instantiated
27: * @param pe the ProgramElement the SchemaVariable is instantiated with
28: */
29: ProgramInstantiation(SchemaVariable sv, ProgramElement pe) {
30: super (sv);
31: this .pe = pe;
32: }
33:
34: /** returns the ProgramElement the SchemaVariable is instantiated with
35: * @return the ProgramElement the SchemaVariable is instantiated with
36: */
37: public ProgramElement getProgramElement() {
38: return pe;
39: }
40:
41: /** returns the intantiation of the SchemaVariable
42: * @return the intantiation of the SchemaVariable
43: */
44: public Object getInstantiation() {
45: return pe;
46: }
47:
48: /** toString */
49: public String toString() {
50: return "[" + getSchemaVariable() + ", " + getProgramElement()
51: + "]";
52: }
53:
54: }
|