Title: AW: (ROSE) java2rei?

Hmmm,

I tried a typecast to some other classes

    Object retval = RoseApplication.lookupRoseApplication();
    if (retval instanceof RoseApplication) { System.out.println(" RoseApplication "); }
    if (retval instanceof IRoseApplication) { System.out.println(" IRoseApplication "); }
    if (retval instanceof IRoseClass) { System.out.println(" IRoseClass "); }
    if (retval instanceof IRoseElement) { System.out.println(" IRoseElement "); }
    if (retval instanceof IRoseModel) { System.out.println(" IRoseModel "); }
    if (retval instanceof IRoseObject) { System.out.println(" IRoseObject "); }
    if (retval instanceof RoseCategory) { System.out.println(" RoseCategory "); }
    if (retval instanceof RoseClass) { System.out.println(" RoseClass "); }
    if (retval instanceof RoseElement) { System.out.println(" RoseElement "); }
    if (retval instanceof RoseItem) { System.out.println(" RoseItem "); }
    if (retval instanceof RoseModel) { System.out.println(" RoseModel "); }
    if (retval instanceof RoseModule) { System.out.println(" RoseModule "); }
    if (retval instanceof RoseObject) { System.out.println(" RoseObject "); }

but it doesn�t work.

No documentation in the help, no docs on the rational�s website. Nothing on the inofficial website (rationalrose.com)

Maybe we should email the support...

    -----Urspr�ngliche Nachricht-----
    Von:    Kuball, Martin [SMTP:[EMAIL PROTECTED]]
    Gesendet am:    Montag, 23. Juli 2001 11:22
    An:     '[EMAIL PROTECTED]'
    Betreff:        Aw:  (ROSE) java2rei?


    > No, I checked this before. Unfortunately I'm really getting back a
    > java.lang.String Object.
    >
    >       res.getClass().getName() -> java.lang.String
    >
    > Martin Kuball
    >
    > > -----Urspr�ngliche Nachricht-----
    > > Von:        [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
    > > Gesendet am:        Montag, 23. Juli 2001 10:51
    > > An: [EMAIL PROTECTED]
    > > Betreff:    AW: (ROSE) java2rei?
    > >
    > > Your code invokes a method of java.lang.Object:
    > >         System.out.println( "result " + res.toString() );
    > > Maybe overwritten by another class, so it doesn�t write the format of
    > > java.lang.Object
    > >
    > > class System {
    > >   public final static PrintStream out = ...
    > > }
    > >
    > > public class PrintStream extends FilterOutputStream {
    > >     public void print(Object obj) {
    > >         write(String.valueOf(obj));
    > >     }
    > >     public void println(Object x) {
    > >         synchronized (this) {
    > >             print(x);
    > >             newLine();
    > >         }
    > >     }
    > > }
    > >
    > > class String {
    > >    public static String valueOf(Object obj) {
    > >         return (obj == null) ? "null" : obj.toString();
    > >     }
    > > }
    > >
    > > public class Object {
    > >     public String toString() {
    > >         return getClass().getName() + "@" +
    > > Integer.toHexString(hashCode());
    > >     }
    > > }
    > >
    > >
    > >
    > > So try more informations via reflection.
    > >
    > >
    > >
    > > -----Urspr�ngliche Nachricht-----
    > > Von:    Kuball, Martin [SMTP:[EMAIL PROTECTED]]
    > > Gesendet am:    Montag, 23. Juli 2001 10:10
    > > An:     [EMAIL PROTECTED]
    > > Betreff:        AW: (ROSE) java2rei?
    > >
    > >
    > > Hm, I tried the follwoing code:
    > >
    > >         import com.rational.java2rei.*;
    > >
    > >         public class Test
    > >         {
    > >
    > >                 public static void main(String [] args)
    > >                 {
    > >                         Object res =
    > > RoseApplication.lookupRoseApplication();
    > >                         System.out.println( "result " + res );
    > >                 }
    > >         }
    > >
    > > and got the answer:
    > >         result 007AC070
    > > The res Object the method returned was a String. So this does not look
    > > very
    > > promising. By the way it seemed as if it tried to start a new rose
    > > instance
    > > instead of connecting to the one already running on my machine.
    > >
    > > Martin Kuball
    > >
    > >
    > > > -----Urspr�ngliche Nachricht-----
    > > > Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
    > > > Gesendet am:  Montag, 23. Juli 2001 09:25
    > > > An:   [EMAIL PROTECTED]
    > > > Betreff:      AW: (ROSE) java2rei?
    > > >
    > > > Via exec-command:
    > > >
    > > >
    > > > --8-<---- MyMenu.mnu ---8-<------8-<-------
    > > > Menu "My Menu"
    > > > {
    > > >         option "My Java Application"
    > > >         {
    > > >                 exec "javaw -classpath myapp.jar MyClass.class"
    > > >         }
    > > > }
    > > > ---8-<----------8-<----------8-<----------8-<----------8-<-------
    > > >
    > > > Not tried ...
    > > >
    > > >
    > > > Mit freundlichen Gr��en
    > > > Jan Mat�rne
    > > >
    > > > RZF NRW
    > > > Sachgebiet 314-P Software-Entwicklungs-Methoden
    > > > Fiscus AFG NW 42 SoftwareEntwicklungsUmgebung
    > > > Internet:       [EMAIL PROTECTED]
    > > >
    > > >
    > > > -----Urspr�ngliche Nachricht-----
    > > > Von:    Kuball, Martin [SMTP:[EMAIL PROTECTED]]
    > > > Gesendet am:    Montag, 23. Juli 2001 09:04
    > > > An:     [EMAIL PROTECTED]
    > > > Betreff:        AW: (ROSE) java2rei?
    > > >
    > > >
    > > > Yes, but how do you execute the java code inside Rose? E.g. in a menu
    > > > definition you have the RoseScript keyword. What do I use for java?
    > > >
    > > > Martin Kuball
    > > >
    > > >
    > >
    ************************************************************************
    * 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/products/rose/usergroups/rose_forum.jtmpl
    * 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