uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

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<OtherClass> otherClassGroup;
}
class OtherClass {}


      

Load the above code into UmpleOnline

 

Another Example

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


      

Load the above code into UmpleOnline

 

Another Example

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


      

Load the above code into UmpleOnline