org.jruby.runtime.callback
Class CglibCallbackFactory

java.lang.Object
  extended byorg.jruby.runtime.CallbackFactory
      extended byorg.jruby.runtime.callback.CglibCallbackFactory

public class CglibCallbackFactory
extends CallbackFactory


Field Summary
 
Fields inherited from class org.jruby.runtime.CallbackFactory
NULL_CLASS_ARRAY
 
Constructor Summary
CglibCallbackFactory()
           
 
Method Summary
 Callback getBlockMethod(java.lang.Class type, java.lang.String method)
           
 Callback getMethod(java.lang.Class type, java.lang.String method)
          gets an instance method with no arguments.
 Callback getMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
          gets an instance method with 1 argument.
 Callback getMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
          gets an instance method with two arguments.
 Callback getOptMethod(java.lang.Class type, java.lang.String method)
          gets an instance method with no mandatory argument and some optional arguments.
 Callback getOptMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
          gets an instance method with 1 mandatory argument and some optional arguments.
 Callback getOptSingletonMethod(java.lang.Class type, java.lang.String method)
          gets a singleton (class) method with no mandatory argument and some optional arguments.
 Callback getOptSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
          gets a singleton (class) method with 1 mandatory argument and some optional arguments.
 Callback getOptSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class[] args)
          gets a singleton (class) method with several mandatory argument and some optional arguments.
 Callback getSingletonMethod(java.lang.Class type, java.lang.String method)
          gets a singleton (class) method without arguments.
 Callback getSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
          gets a singleton (class) method with 1 argument.
 Callback getSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
          gets a singleton (class) method with 2 arguments.
 
Methods inherited from class org.jruby.runtime.CallbackFactory
createFactory, getFalseMethod, getNilMethod, getSelfMethod, getTrueMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CglibCallbackFactory

public CglibCallbackFactory()
Method Detail

getMethod

public Callback getMethod(java.lang.Class type,
                          java.lang.String method)
Description copied from class: CallbackFactory
gets an instance method with no arguments.

Specified by:
getMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getMethod

public Callback getMethod(java.lang.Class type,
                          java.lang.String method,
                          java.lang.Class arg1)
Description copied from class: CallbackFactory
gets an instance method with 1 argument.

Specified by:
getMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
arg1 - the class of the only argument for this method
Returns:
a CallBack object corresponding to the appropriate method

getMethod

public Callback getMethod(java.lang.Class type,
                          java.lang.String method,
                          java.lang.Class arg1,
                          java.lang.Class arg2)
Description copied from class: CallbackFactory
gets an instance method with two arguments.

Specified by:
getMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
arg1 - the java class of the first argument for this method
arg2 - the java class of the second argument for this method
Returns:
a CallBack object corresponding to the appropriate method

getSingletonMethod

public Callback getSingletonMethod(java.lang.Class type,
                                   java.lang.String method)
Description copied from class: CallbackFactory
gets a singleton (class) method without arguments.

Specified by:
getSingletonMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getSingletonMethod

public Callback getSingletonMethod(java.lang.Class type,
                                   java.lang.String method,
                                   java.lang.Class arg1)
Description copied from class: CallbackFactory
gets a singleton (class) method with 1 argument.

Specified by:
getSingletonMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
arg1 - the class of the only argument for this method
Returns:
a CallBack object corresponding to the appropriate method

getSingletonMethod

public Callback getSingletonMethod(java.lang.Class type,
                                   java.lang.String method,
                                   java.lang.Class arg1,
                                   java.lang.Class arg2)
Description copied from class: CallbackFactory
gets a singleton (class) method with 2 arguments.

Specified by:
getSingletonMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getBlockMethod

public Callback getBlockMethod(java.lang.Class type,
                               java.lang.String method)
Specified by:
getBlockMethod in class CallbackFactory

getOptSingletonMethod

public Callback getOptSingletonMethod(java.lang.Class type,
                                      java.lang.String method,
                                      java.lang.Class arg1)
Description copied from class: CallbackFactory
gets a singleton (class) method with 1 mandatory argument and some optional arguments.

Specified by:
getOptSingletonMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
arg1 - the class of the only mandatory argument for this method
Returns:
a CallBack object corresponding to the appropriate method

getOptSingletonMethod

public Callback getOptSingletonMethod(java.lang.Class type,
                                      java.lang.String method,
                                      java.lang.Class[] args)
Description copied from class: CallbackFactory
gets a singleton (class) method with several mandatory argument and some optional arguments.

Specified by:
getOptSingletonMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
args - an array of java class of the mandatory arguments (NOTE: this must include the appropriate rest argument class (usually a RubyObject[].class))
Returns:
a CallBack object corresponding to the appropriate method

getOptSingletonMethod

public Callback getOptSingletonMethod(java.lang.Class type,
                                      java.lang.String method)
Description copied from class: CallbackFactory
gets a singleton (class) method with no mandatory argument and some optional arguments.

Specified by:
getOptSingletonMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getOptMethod

public Callback getOptMethod(java.lang.Class type,
                             java.lang.String method)
Description copied from class: CallbackFactory
gets an instance method with no mandatory argument and some optional arguments.

Specified by:
getOptMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getOptMethod

public Callback getOptMethod(java.lang.Class type,
                             java.lang.String method,
                             java.lang.Class arg1)
Description copied from class: CallbackFactory
gets an instance method with 1 mandatory argument and some optional arguments.

Specified by:
getOptMethod in class CallbackFactory
Parameters:
type - java class where the method is implemented
method - name of the method
arg1 - the class of the only mandatory argument for this method
Returns:
a CallBack object corresponding to the appropriate method


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.