net.rmi.rmiSynth.lex
Class Transform

java.lang.Object
  extended by net.rmi.rmiSynth.lex.Transform

public class Transform
extends java.lang.Object


Constructor Summary
Transform()
           
 
Method Summary
static void castIt(LexBase lb, java.lang.String srcClass, java.lang.String tgtClass)
          Substitutes all references to srcClass to tgtClass in the instance of LexBase class (except for clone() method)
static void castParams(LexParam[] prm, java.lang.String srcClass, java.lang.String tgtClass)
          Substitutes all references to srcClass to tgtClass in the array of parameters (except for clone() method)
static java.lang.String stripPackageName(java.lang.String s)
          Removes everything before last dot in a string
static void toRMIClient(LexBase lb, java.lang.String ServerInter, java.lang.String ServerClass, java.lang.String ClientClass, java.lang.String IP)
          Modifies a LexBase class such way that it complies to RMI server specifications Imports java.rmi.* and java.rmi.registry.*
static void toRMIInterface(LexBase lb)
          Modifies a LexBase class such way that it complies to RMI interface specifications Adds to class declaration Adds to method declarations
static void toRMIServer(LexBase lb, java.lang.String ServerInter, java.lang.String ServerClass)
          Modifies a LexBase class such way that it complies to RMI server specifications Imports java.rmi.* and java.rmi.registry.* Adds to class declaration Adds to class declaration Adds to method declarations
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transform

public Transform()
Method Detail

castIt

public static void castIt(LexBase lb,
                          java.lang.String srcClass,
                          java.lang.String tgtClass)
Substitutes all references to srcClass to tgtClass in the instance of LexBase class (except for clone() method)

Parameters:
lb - Instance of LexBase class
srcClass - Name of the class that needs to be replaced
tgtClass - Name of the class that will be put in

castParams

public static void castParams(LexParam[] prm,
                              java.lang.String srcClass,
                              java.lang.String tgtClass)
Substitutes all references to srcClass to tgtClass in the array of parameters (except for clone() method)

Parameters:
prm - Array of parameters
srcClass - Name of the class that needs to be replaced
tgtClass - Name of the class that will be put in

stripPackageName

public static java.lang.String stripPackageName(java.lang.String s)
Removes everything before last dot in a string

Parameters:
String - to be stripped -
Returns:
Stripped string -

toRMIInterface

public static void toRMIInterface(LexBase lb)
Modifies a LexBase class such way that it complies to RMI interface specifications Adds to class declaration Adds to method declarations

Parameters:
lb - Instance of LexBase class

toRMIServer

public static void toRMIServer(LexBase lb,
                               java.lang.String ServerInter,
                               java.lang.String ServerClass)
Modifies a LexBase class such way that it complies to RMI server specifications Imports java.rmi.* and java.rmi.registry.* Adds to class declaration Adds to class declaration Adds to method declarations

Parameters:
lb - Instance of LexBase class
ServerInter - Name of interface to implement
ServerClass - Name of new class

toRMIClient

public static void toRMIClient(LexBase lb,
                               java.lang.String ServerInter,
                               java.lang.String ServerClass,
                               java.lang.String ClientClass,
                               java.lang.String IP)
Modifies a LexBase class such way that it complies to RMI server specifications Imports java.rmi.* and java.rmi.registry.*

Parameters:
lb - Instance of LexBase class
ServerInter - Name of interface to instanciate
ServerClass - Name of server class to connect to
ClientClass - Name of new class to create
fwdMethod - Method from server which is called
IP - Address of server to connect