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: //
12:
13: package de.uka.ilkd.key.logic.sort;
14:
15: import de.uka.ilkd.key.logic.Name;
16:
17: public class ClassInstanceSortImpl extends AbstractNonCollectionSort
18: implements ClassInstanceSort {
19:
20: final SetOfSort ext;
21: /** this field indicates if a <get> function shall be created or not */
22: final boolean representsAbstractJavaOrInterfaceSort;
23:
24: /** creates a ClassInstanceSort*/
25: public ClassInstanceSortImpl(Name name, SetOfSort ext, boolean abs) {
26: super (name);
27: this .ext = ext;
28: this .representsAbstractJavaOrInterfaceSort = abs;
29: }
30:
31: /** creates a ClassInstanceSort*/
32: public ClassInstanceSortImpl(Name name,
33: de.uka.ilkd.key.logic.sort.Sort ext, boolean abs) {
34: this (name, SetAsListOfSort.EMPTY_SET.add(ext), abs);
35: }
36:
37: /** creates a ClassInstanceSort*/
38: public ClassInstanceSortImpl(Name name, boolean abs) {
39: this (name, SetAsListOfSort.EMPTY_SET, abs);
40: }
41:
42: /**
43: * @return the sorts of the predecessors of this sort
44: */
45: public SetOfSort extendsSorts() {
46: return ext;
47: }
48:
49: public boolean representAbstractClassOrInterface() {
50: return representsAbstractJavaOrInterfaceSort;
51: }
52: }
|