[Uml-devel] Interfaces not properly implemented

Jonathan Riddell jr at jriddell.org
Wed Mar 12 13:58:08 UTC 2003


On Tue, 11 Mar 2003, Brian Thomas wrote:

>
> 	I was taking a look at how to generate interface classes in the javawriter
> 	and discovered what I think is an error in the abstraction of the "UMLConcept"
> 	and "UMLInterface" classes ... namely that they arent related at all, except at
> 	the UMLCanvasObject level, which is too far down the inheritance tree. From
> 	the UML Notation Guide, an "interface" is defined as a
> "specifier of visible operations
> 	on a class, component or other classifier". The spec goes on to say that an
> 	interface is "formally equivalent to an abstract class with no
> attributes or methods
> 	and only abstract operations"
>
> 	This suggests to me that the inheritance should be the following:
>
>         UMLCanvasObject
>                |
>         UMLConcept---------------
>              |                  |
>           UMLClass         UMLInterface
>
>
> 	I would make "UMLConcept" an abstract class. (BTW, where does the name "UMLConcept"
> 	come from? I cant find it in the UML docs..perhaps I didnt look hard enough?? Its not mentioned
> 	in any of the UML guide books I have either).

That's not entirely different from
http://uml.sourceforge.net/developers/umbrello-umlobject-design.png

My idea there was that Classes have lists (attributes and operations), so
do Interfaces and so does stuff like Datatypes and maybe they could all
share an interface (UMLClassifierList).  It never worked out (I had too
much bother with UMLClassifierList)

So if you want to do what you say above, feel free.  I'd have the classes
named
         UMLCanvasObject
                |
         UMLClassifier---------------
              |                  |
           UMLConcept         UMLInterface

Classifier is the superclass for Classes and Interfaces in the UML
metamodel (says here).  I'd keep UMLConcept as UMLConecpt because it's not
really worth changing the name, although I agree that it's a bit of a
pain.

Jonathan Riddell






More information about the umbrello-devel mailing list