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.casetool.patternimplementor;
12:
13: import javax.swing.tree.DefaultMutableTreeNode;
14:
15: public class PMTreeNode extends DefaultMutableTreeNode {
16:
17: private Class pattern;
18:
19: private String pmPath;
20:
21: PMTreeNode(Class pattern) {
22: try {
23: this .pmPath = ((AbstractPatternImplementor) pattern
24: .newInstance()).getName();
25: } catch (Exception e) {
26: e.printStackTrace();
27: }
28:
29: this .pattern = pattern;
30: }
31:
32: public Class getPattern() {
33: return pattern;
34: }
35:
36: public String getpmPath() {
37: return pmPath;
38: }
39:
40: public String toString() {
41: String retval = pmPath.substring(pmPath.lastIndexOf(":") + 1,
42: pmPath.length());
43:
44: return retval;
45: }
46: }
|