Skip to content

Package: ExceptionConstants

ExceptionConstants

Coverage

1: package de.fhdw.wtf.common.constants.walker;
2:
3: import de.fhdw.wtf.common.ast.ConstructorReference;
4: import de.fhdw.wtf.common.ast.type.ByReferenceState;
5: import de.fhdw.wtf.common.ast.type.TypeProxy;
6:
7: /**
8: * Contains Exception Messages for Walker.
9: */
10: public final class ExceptionConstants {
11:         
12:         /**
13:          * Following Task forms a dependency on itself.
14:          */
15:         public static final String CYCLIC_DEPENDENCY_MESSAGE = "Following Task forms a dependency on itself: ";
16:         
17:         /**
18:          * Duplicate Attributename.
19:          */
20:         public static final String DOUBLE_ATTRIBUTENAME_MESSAGE = "Duplicate Attributename: ";
21:         
22:         /**
23:          * Duplicate Classname.
24:          */
25:         public static final String DOUBLE_CLASSNAME_MESSAGE = "Duplicate Classname: ";
26:         
27:         /**
28:          * Duplicate Groupname.
29:          */
30:         public static final String DOUBLE_GROUPNAME_MESSAGE = "Duplicate Groupname: ";
31:         
32:         /**
33:          * Found cycle in the inheritancestructur, because of.
34:          */
35:         public static final String CYCLIC_INHERITANCE_MESSAGE = "Found cycle in the inheritancestructur, because of: ";
36:         
37:         /**
38:          * Cyclic Part definition in GroupTask.
39:          */
40:         public static final String CYCLIC_PART_DEFINITION_MESSAGE = "Cyclic Part definition in GroupTask";
41:         
42:         /**
43:          * Invalid attribute modifier.
44:          */
45:         public static final String INVALID_ATTRIBUTE_MODIFIER_MESSAGE = "Invalid attribute modifier: ";
46:         
47:         /**
48:          * Base types can't have reverse getters.
49:          */
50:         public static final String INVALID_SYMMETRIC_ATTRIBUTE_REASON = "Base types can't have reverse getters";
51:         
52:         /**
53:          * Only abstract classes are allowed to have abstract operations.
54:          */
55:         public static final String ABSTRACT_OPERATIONS_MESSAGE = "Only abstract classes "
56:                         + "are allowed to have abstract operations.";
57:         
58:         /**
59:          * The names of the productElements must be pairwise distinct in every product. Duplicate ProductElementName.
60:          */
61:         public static final String INVALID_PRODUCT_MESSAGE = "The names of the productElements "
62:                         + "must be pairwise distinct in every product. Duplicate ProductElementName: ";
63:         
64:         /**
65:          * Invalid Overloading! Another operation has the same name and parametertypes!
66:          */
67:         public static final String INVALID_OVERLOADING_MESSAGE = "Invalid Overloading! "
68:                         + "Another operation has the same name and parametertypes!";
69:         
70:         /**
71:          * It is not allowed, that a Class extends a Basetype.
72:          */
73:         public static final String BASETYPE_INHERITANCE_MESSAGE = "It is not allowed, that a Class extends a Basetype: ";
74:         
75:         /**
76:          * Duplicate constructors within the same class are not allowed.
77:          */
78:         public static final String DUPLICATE_CONSTRUCTOR_MESSAGE = "Duplicate copnstructor: ";
79:         
80:         /**
81:          * A {@link ConstructorReference} has been found in an InvalidState.
82:          */
83:         public static final String INVALID_CONSTRUCTOR_REFERENCE_MESSAGE_INVALID_STATE =
84:                         "This constructor reference is in an invalid state: ";
85:         
86:         /**
87:          * A constructor of class c cannot contain more than one reference if the only reference points to another
88:          * constructor of c.
89:          */
90:         public static final String INVALID_CONSTRUCTOR_REFERENCE_LIST_MESSAGE_WRONG_REFERENCE_VARIANTS =
91:                         "Only super constructor references or exactly one reference "
92:                                         + "to own classes constructor is allowed - constructor: ";
93:         
94:         /**
95:          * A {@link ConstructorReference} does neither point to a super types constructor nor to a constructor of its
96:          * surrounding class.
97:          */
98:         public static final String INVALID_CONSTRUCTOR_REFERENCE_LIST_MESSAGE_NO_SUPERTYPE =
99:                         "A constructor reference does neither point to a super types constructor "
100:                                         + "nor to a constructor of its surrounding class: ";
101:         
102:         /**
103:          * Not more than one {@link ConstructorReference} can point to a constructor of the same super type.
104:          */
105:         public static final String INVALID_CONSTRUCTOR_REFERENCE_LIST_MESSAGE_MULTIPLE_REFERENCES_TO_ONE_SUPER_TYPE =
106:                         "Two constructor references point to constructors of the same super type of the surrounding class: ";
107:         
108:         /**
109:          * There has to be a reference to a constructor of each super type.
110:          */
111:         public static final String INVALID_CONSTRUCTOR_REFERENCE_LIST_NOT_ENOUGTH_REFERENCES_TO_SUPER_TYPES =
112:                         "Constructors of all super classes are not being referenced: ";
113:         
114:         /**
115:          * A reference should not point to the same constructor as the one it is called from.
116:          */
117:         public static final String INVALID_CONSTRUCTOR_REFERENCE_LIST_MESSAGE_REFERENCE_POINTS_TO_CALLING_CONSTRUCTOR =
118:                         "The constructor should not call itself but another constructor of its class: ";
119:         
120:         /**
121:          * A constructor can reference either exactly one constructor of its own class or exactly one constructor per super
122:          * type of its class; not both variants at the same time.
123:          */
124:         public static final String INVALID_CONSTRUCTOR_REFERENCE_LIST =
125:                         "The constructor references super constructors as well as constructors of its own class.";
126:         
127:         /**
128:          * {@link TypeProxy} objects can only return a target type if they are in a {@link ByReferenceState}.
129:          */
130:         public static final String NO_TYPE_PROXY_TARGET_AVAILABLE =
131:                         "The state of this TypeProxy is not the ByReferenceState. Therefore no target type can be returned.";
132:         
133:         public static final String WRONG_THROWING_DECLARATION = "The Throw-Declaration is incorrect!";
134:         
135:         /**
136:          * Constructor of {@link ExceptionConstants}.
137:          */
138:         private ExceptionConstants() {
139:         }
140: }