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: package de.uka.ilkd.key.strategy.feature;
09:
10: import de.uka.ilkd.key.logic.op.Operator;
11:
12: /**
13: * The feature behaves in overall as @link {@link DirectlyBelowSymbolFeature} but tests
14: * if the operator directly above belongs to a certain class of operators
15: *
16: * TODO: eliminate this class and use term features instead
17: */
18: public class DirectlyBelowOpClassFeature extends DirectlyBelowFeature {
19:
20: private DirectlyBelowOpClassFeature(Class badSymbol, int index) {
21: super (badSymbol, index);
22: }
23:
24: public static Feature create(Class badSymbol) {
25: return new DirectlyBelowOpClassFeature(badSymbol, -1);
26: }
27:
28: public static Feature create(Class badSymbol, int index) {
29: return new DirectlyBelowOpClassFeature(badSymbol, index);
30: }
31:
32: protected boolean isBadSymbol(Operator op) {
33: return ((Class) badSymbol).isInstance(op);
34: }
35:
36: }
|