Skip to content

Commit

Permalink
Composition/Participant EList value type now generalized
Browse files Browse the repository at this point in the history
To avoid some type errors
  • Loading branch information
steve-hickman-epistimis committed Feb 21, 2024
1 parent d8d6fab commit cb7a33f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
*
*/
public class ConceptualEntityProcessor extends
EntityProcessor<ConceptualComposableElement, ConceptualCharacteristic, ConceptualEntity, ConceptualAssociation, ConceptualComposition, ConceptualParticipant, ConceptualObservable, ConceptualDataModel> {
EntityProcessor<ConceptualComposableElement, ConceptualCharacteristic, ConceptualEntity,
ConceptualAssociation, ConceptualComposition, ConceptualParticipant,
ConceptualObservable, ConceptualDataModel> {

@Inject
IQualifiedNameProvider qnp; // = new UddlQNP();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public abstract class EntityProcessor<ComposableElement extends UddlElement,
abstract public boolean isAssociation(Entity ent);
abstract public Association conv2Association(Entity ent);

abstract public EList<Composition> getComposition(Entity obj);
abstract public EList<? extends Composition> getComposition(Entity obj);

abstract public EList<Participant> getParticipant(Association obj);
abstract public EList<? extends Participant> getParticipant(Association obj);

abstract public Composition conv2Composition(Characteristic characteristic);
abstract public Participant conv2Participant(Characteristic characteristic);
Expand Down Expand Up @@ -609,7 +609,7 @@ public IScope scopeForCompositionSelection(Entity entity) {
return IScope.NULLSCOPE;
}
else {
EList<Composition> comps = getComposition(entity);
EList<? extends Composition> comps = getComposition(entity);
// Can't use the default scopeFor because Compositions have a 'rolename' instead of a 'name'.
// See the implementation of the default Scopes.scopeFor method.
// So, do this instead:
Expand Down Expand Up @@ -637,7 +637,7 @@ public IScope scopeForParticipantSelection(Association entity) {
}
else {
Entity spec = getSpecializes(entity);
EList<Participant> parts = getParticipant(entity);
EList<? extends Participant> parts = getParticipant(entity);
// Associations can specialize an Entity but not the otherway around (because once
// you have participants, you can't get rid of them). So, once we find a specialization
// that is *not* an Association, we can stop.
Expand Down

0 comments on commit cb7a33f

Please sign in to comment.