list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

W046 Attribute Has Template Type

Umple syntactic warning reported when an attribute has a template type, characterized by brackets "<...>".

Template types do not follow Umple modelling conventions. Umple encourages users to take full advantage of associations in their modelling, which in almost all contexts replace the need for template types. Multivalued attributes can also be used.

Example

// This example generates the message

class A {
  depend java.util.List;
  List<OtherClassA> otherClassGroup;
}
class OtherClassA {}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// The following shows how to avoid
// the message using a multivalued attribute
class B {
  OtherClassB[] otherClassGroup;
}
class OtherClassB {}

      

Load the above code into UmpleOnline

 

Another Solution to The Above So the Message No Longer Appears

// The following shows how to avoid
// the message using an association
class C {
  0..1 -- * OtherClassC;
}
class OtherClassC {}
      

Load the above code into UmpleOnline