Add generics to ImplementationClass
Currently there is no support for generics in the metamodel. For collections the type RCollection
exists in the metamodel, which can be parametrized with a type of its elements.
In order to fully support implementation classes (see issue #34) we need support for generics. For example, when importing Java generic classes.
Regular classes don't need generic support, because by using partial classes in methods, a form of generics is used.
This is still open and needs to be discussed: Once we have that, we don't need RCollection types (RSet and RSequence) anymore in the metamodel, because implementation classes would be used instead. However, it could be nice to abstract from the actual language to be used and leave it open until code generation.
Comments (6)
-
reporter -
reporter References issue
#74and issue#94: Made PrimitiveType inherit from ObjectType instead of directly from Type. This makes more sense, because through inheriting from ImplementationClass it is also an ObjectType. When referring to an ObjectType, every proper type (primitive plus classes) is included.→ <<cset a2a50c2e8667>>
-
reporter References issue
#74: Added TypeParameter to Classifier as per instructions. Edit code needs to be adjusted still.→ <<cset 69acc5046e96>>
-
reporter - changed status to resolved
Resolved issue
#74: Adjusted edit code such that- TypeParameters text is shown depending on whether the generic type is set (shows the generic type, otherwise the name of the type parameter)
- TypeParameter gets updated also when the referenced generic type is updated
- change listeners also consider generic type of type parameter changes
→ <<cset f73f9241cb2d>>
-
reporter -
assigned issue to
-
assigned issue to
-
reporter References issue
#74: Added text for type parameters in textual representation. E.g., ArrayList<int>.Text wasn't updated when TypeParameter was updated and the used type is referenced in a Parameter. Added a "lax" check, because otherwise it is necessary to iterate through all parameters.
→ <<cset d92a6c24f38a>>
- Log in to comment
As per discussion in the meeting on March 12th:
TypeParameter
as a sub-class ofType
. The name will be the generic type name (e.g. T), a reference toObjectType
)genericType
(0..1) will denote the chosen actual type.typeParameters
.