(responding to Paul Netherwood)

>  There is a major limitation of using a 'realise' relationship with Rose
> Java. The code generator treats a realise relationship as implementing an
> interface and generates an error "java classes can only implement
> interfaces" if your class is not an interface. This makes what you're
trying
> to do very difficult with realise and Java. If you change your pattern
class
> stereotype to <<Interface>> to get round the problem the code generator
adds
> code to implement your pattern class which is almost certainly what you
> don't want. I've tried changing the component type to Analysis and
turning
> code generation off for the class still gives the same error. In the end
I
> used a dependency relationship stereotyped with <<Realise>>. Not ideal.
> 
> The ideal would be that the code generator does not generate implements
for
> non-Java classes with a realise relationship. 
> 
> Has anyone found a better workaround?

You're correct that I wasn't using that model for code generation.  I seem
to
recall that we had controlled units for the code-generated parts, and did
code generation from another model - one that didn't have the 'Realise'
associations to the pattern parts. (We were working in C++).  On other 
occasions we have actually implemented the patterns (using Inheritance,
C++ allows multiple inheritance).

Perhaps somebody could confirm this (separation of design pattern 
relationships into separate units, in separate model not for code
generation) 
would / would not work for Java?  Again, it's not an ideal work-round.

Paul Oldfield

any opinions expressed herein are not necessarily those of
Mentors of Cally


************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: http://www.rational.com/support/usergroups/rose/rose_forum.jsp
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to