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.rule.encapsulation;
12:
13: import de.uka.ilkd.key.util.Debug;
14:
15: class NullScheme implements TypeScheme {
16: public static final NullScheme INSTANCE = new NullScheme();
17:
18: private NullScheme() {
19: }
20:
21: public TypeScheme combineWith(TypeScheme ts) {
22: Debug.fail("Undefined use of type scheme combinator");
23: return null;
24: }
25:
26: public boolean subSchemeOf(TypeScheme ts) {
27: return (ts instanceof RepScheme || ts instanceof PeerScheme
28: || ts instanceof ReadonlyScheme || ts instanceof RootScheme);
29: }
30:
31: public boolean equalTo(TypeScheme ts) {
32: return ts == INSTANCE;
33: }
34:
35: public String toString() {
36: return "nullS";
37: }
38: }
|