org.apache.yoko.rmi.util.stub
Class StubClass

java.lang.Object
  extended by org.apache.yoko.rmi.util.stub.StubClass

public final class StubClass
extends Object


Constructor Summary
StubClass()
           
 
Method Summary
static Stub createInstance(Class clazz)
           
static Stub createInstance(Class clazz, Object handler)
           
static MethodRef[] getAbstractMethodRefs(Class base, Class[] interfaces)
           
static Object getStubHandler(Stub stub)
          Return the stub handler for the given stub.
static Class make(ClassLoader loader, Class super_class, Class[] interfaces, MethodRef[] methods, Method[] superMethods, Object[] data, Method handler_method, String package_name, String class_name, StubInitializer initializer)
          Construct a stub for which it's handler is determined by using a StubInitializer.
static Class make(ClassLoader loader, Class super_class, Class[] interfaces, MethodRef[] methods, Method[] superMethods, Object[] data, Method handler_method, String package_name, StubInitializer initializer)
           
static Class make(ClassLoader loader, Class super_class, Class[] interfaces, MethodRef[] methods, Object[] data, Method handler_method, String package_name)
          Construct a StubClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubClass

public StubClass()
Method Detail

getStubHandler

public static Object getStubHandler(Stub stub)
Return the stub handler for the given stub.


make

public static Class make(ClassLoader loader,
                         Class super_class,
                         Class[] interfaces,
                         MethodRef[] methods,
                         Object[] data,
                         Method handler_method,
                         String package_name)
Construct a StubClass.

Parameters:
loader - designates the classloader to use for constructing the stubclass. If null, the current context class loader will be used.
super_class - is the base class for the new stub. If null java.lang.Object will be used.
interfaces - designates the interfaces the stub class should implement. This value may be null if no additional interfaces should be included.
methods - is the list of methods to implement in the stub class. If this parameter is null, stub methods will be generated for all abstract methods declared but not implemented.
data - describes the data to be passed along as the second argument to a handler method.
handler_method - is the method used for delegating the call handled by a stub method. If null, then com.trifork.StubHandler.invoke() is used. This method must have a signature `public Object Handler.name(Object, Data, Object)'. The constructor to the resulting stub class takes as it's argument, a Handler object.
package_name - is the name of the package into which the stub class is defined. If null, then the package of the super_class is used; unless it lives in a sealed package, in which case the package anme is undefined.

getAbstractMethodRefs

public static MethodRef[] getAbstractMethodRefs(Class base,
                                                Class[] interfaces)

make

public static Class make(ClassLoader loader,
                         Class super_class,
                         Class[] interfaces,
                         MethodRef[] methods,
                         Method[] superMethods,
                         Object[] data,
                         Method handler_method,
                         String package_name,
                         StubInitializer initializer)

make

public static Class make(ClassLoader loader,
                         Class super_class,
                         Class[] interfaces,
                         MethodRef[] methods,
                         Method[] superMethods,
                         Object[] data,
                         Method handler_method,
                         String package_name,
                         String class_name,
                         StubInitializer initializer)
Construct a stub for which it's handler is determined by using a StubInitializer. Using this, the resulting class has a no-arg constructor.

Parameters:
superMethods - is an array of methods defined in the super_class, for which super.method trampolines should be generated. Upon return, the array has filled in java.lang.reflect.Method objects for the generated trampolines.

createInstance

public static Stub createInstance(Class clazz,
                                  Object handler)

createInstance

public static Stub createInstance(Class clazz)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.