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

User Manual    [Previous]   [Next]   

E005 Undefined Class in Association

Umple semantic error reported when an an association is specified to a class that cannot be found

The classes at both ends of an association must exist in the system being compiled. It might be that the specified class is spelled wrongly or has been omitted from the compilation. If you are making an association to a class in existing code, then simply declare the class as external, as shown in the third example below.

Example

// This example generates the error message
class X {
  1 -- * Y;
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// The following shows how to avoid the error
class X {
  1 -- * Y;
}
class Y {}
      

Load the above code into UmpleOnline

 

Another Solution to The Above So the Message No Longer Appears

// It is also possible to designate that
// the class Y is external in the following manner
class X {
  1 -- * Y;
}
external Y {}
      

Load the above code into UmpleOnline

 

Another Example

// The following will also generate the error message
class X {}
class Y {}

association {
  1 X -- * Z;
}
      

Load the above code into UmpleOnline