swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with latest win32 patch for java VarProbe


From: Marcus G. Daniels
Subject: Re: problem with latest win32 patch for java VarProbe
Date: 03 Jul 2000 14:50:10 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "SB" == Steve Brophy <address@hidden> writes:

SB> Am I still not seeing the correct way to make probemaps for
SB> inherited variables, or is the 'new way' fine and we should update
SB> our client site's dll files?  Or is something more needed as in
SB> your suggestion of subclasses on VarProbe?

The code below works for me with 2.1.1, the current snapshot, and
the last set of DLLs in 2.1.1-fixes.

A downside is that it issues some warnings.  The snapshot¹
removes the warnings so that this kind of use is quiet.

¹ ftp://ftp.swarm.org/pub/swarm/src/testing/swarm-2000-07-03.tar.gz

import swarm.Globals;
import swarm.objectbase.VarProbe;

class BaseClass {
    public String myName;
}
class SubClass extends BaseClass {
    public int id;
}

public class SuperClassProbe {
  static VarProbe getProbeForVariable (String name, Class clas) {
    VarProbe vp =
      Globals.env.probeLibrary.getProbeForVariable$inClass (name, clas);
    if (vp == null)
      {
        clas = clas.getSuperclass ();
        if (clas != null)
          vp = getProbeForVariable (name, clas);
      }
    return vp;
  }
  
  public static void main(String[] args) {
    Globals.env.initSwarm("test1","00","smb",args);
    System.out.println("Got a varprobe, vp = " +
                       getProbeForVariable ("myName", SubClass.class));
  }
}  

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]