I created an interface named FlyBehavior which has a sole behavior fly,
Now it need two implementation classes,one’s name is FlyWithWings,the other
is FlyNoWay.I done them like this below:
Step-1 select class FlyWithWings,make it’s stereoType be implementationClass.
Step-2 click ‘Supplier Dependencies’,inputted ‘FlyBehavior’ as the stereoType’s name,
make the stereoType’s base-class be Interface Option,and select the interface
FlyBehavior’s namespace as stereotype’s namespace
Step-3 save it.
Step-4 select all,click UML->Jenerate Java.
ok,the java code for interface and implemantation class was generated.
but but there’s no method in class FlyWithWing and FlyNoWay,why?
I think it must have a method ‘fly’ as leat.
The more boring thing is that class FlyWithWing did not implement interface
FlyBehavior at all.
Is it a bug in UML designation?
Thanks for your reply!