Title: RE: (ROSE) How to show association to local class variable withou t generation g extraneous Java code

Actually, the Realize relationship does not generate the import (which I think it ought to do, but it doesn't).  I don't really need Rose to create the local variable, I just need to get it to NOT create the instance variable.

-----Original Message-----
From: Knight, David (MED) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12, 2001 12:14 PM
To: '[EMAIL PROTECTED]'
Subject: RE: (ROSE) How to show association to local class variable
withou t generation g extraneous Java code


I think the relationship you may need is the Realize relationship.  I
don't know too much about it, but if the variable is local to a method I
don't think there is anyway to get Rose to create it in the code for
you.  With the Realize relationship however, it should generate the
import statement.
 
Best of luck.
 
David Knight
------------------
GE Medical Systems
Software Engineering Intern
(262) 521-6586
[EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12, 2001 6:00 AM
To: [EMAIL PROTECTED]
Subject: (ROSE) How to show association to local class variable without
generatin g extraneous Java code



I'm in a bit of a quandary.  I have the following situation:

I am modeling a set of Java classes.  One class (say, Sender) sends
messages to another class (say, Receiver).  The method in Sender that
sends messages to Receiver holds a reference to the Receiver object in a
local method variable as opposed to an instance variable.  I want the
model to show that Sender sends messages to Receiver, so I think I want
to create an association between Sender and Receiver.  But I have two
problems when I forward engineer:

1) Rose insists on creating an instance variable for the Receiver class
object, which I don't want since I've got the reference in a local
variable.

2) Rose doesn't add an import for the class if it is in another package.
The only good way I've found to force Rose to include the import is to
create a dependency to the Receiver class.

On a similar note, I have the same problem showing associations to
static classes (i.e., classes that only have static methods and never
get instantiated).

Anyone got any ideas how to convince Rose to generate the proper Java
code in this situation?

        Steven F. Caswell

        Senior Software Architect

        BuildNet

        ______________________________________________________

        250 Scientific Drive, Suite 800,  Atlanta, GA  30092

        main: 678-225-2260  |  fax: 678-225-2459  |  direct:
678-225-2320

[EMAIL PROTECTED]  |  http://www.buildnet.com
<http://www.buildnet.com>

Reply via email to