org.jruby.runtime.callback
Class ReflectionCallbackFactory

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

public class ReflectionCallbackFactory
extends CallbackFactory


Field Summary
 
Fields inherited from class org.jruby.runtime.CallbackFactory
NULL_CLASS_ARRAY
 
Constructor Summary
ReflectionCallbackFactory(java.lang.Class type)
           
 
Method Summary
 CompiledBlockCallback getBlockCallback(java.lang.String method)
           
 Callback getBlockMethod(java.lang.String method)
           
 Callback getFastMethod(java.lang.String method)
           
 Callback getFastMethod(java.lang.String method, java.lang.Class arg1)
           
 Callback getFastMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
           
 Callback getFastMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2, java.lang.Class arg3)
           
 Callback getFastOptMethod(java.lang.String method)
           
 Callback getFastOptSingletonMethod(java.lang.String method)
           
 Callback getFastSingletonMethod(java.lang.String method)
           
 Callback getFastSingletonMethod(java.lang.String method, java.lang.Class arg1)
           
 Callback getFastSingletonMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
           
 Callback getFastSingletonMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2, java.lang.Class arg3)
           
 Callback getMethod(java.lang.String method)
          gets an instance method with no arguments.
 Callback getMethod(java.lang.String method, java.lang.Class arg1)
          gets an instance method with 1 argument.
 Callback getMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
          gets an instance method with two arguments.
 Callback getMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2, java.lang.Class arg3)
          gets an instance method with two arguments.
 Callback getOptMethod(java.lang.String method)
          gets an instance method with no mandatory argument and some optional arguments.
 Callback getOptSingletonMethod(java.lang.String method)
          gets a singleton (class) method with no mandatory argument and some optional arguments.
 Callback getSingletonMethod(java.lang.String method)
          gets a singleton (class) method without arguments.
 Callback getSingletonMethod(java.lang.String method, java.lang.Class arg1)
          gets a singleton (class) method with 1 argument.
 Callback getSingletonMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
          gets a singleton (class) method with 2 arguments.
 Callback getSingletonMethod(java.lang.String method, java.lang.Class arg1, java.lang.Class arg2, java.lang.Class arg3)
          gets a singleton (class) method with 3 arguments.
 
Methods inherited from class org.jruby.runtime.CallbackFactory
createFactory, createFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionCallbackFactory

public ReflectionCallbackFactory(java.lang.Class type)
Method Detail

getMethod

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

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

getFastMethod

public Callback getFastMethod(java.lang.String method)
Specified by:
getFastMethod in class CallbackFactory

getMethod

public Callback getMethod(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:
method - name of the method
arg1 - the class of the only argument for this method
Returns:
a CallBack object corresponding to the appropriate method

getFastMethod

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

getMethod

public Callback getMethod(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:
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

getFastMethod

public Callback getFastMethod(java.lang.String method,
                              java.lang.Class arg1,
                              java.lang.Class arg2)
Specified by:
getFastMethod in class CallbackFactory

getMethod

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

Specified by:
getMethod in class CallbackFactory
Parameters:
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
arg3 - the java class of the second argument for this method
Returns:
a CallBack object corresponding to the appropriate method

getFastMethod

public Callback getFastMethod(java.lang.String method,
                              java.lang.Class arg1,
                              java.lang.Class arg2,
                              java.lang.Class arg3)
Specified by:
getFastMethod in class CallbackFactory

getSingletonMethod

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

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

getFastSingletonMethod

public Callback getFastSingletonMethod(java.lang.String method)
Specified by:
getFastSingletonMethod in class CallbackFactory

getSingletonMethod

public Callback getSingletonMethod(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:
method - name of the method
arg1 - the class of the only argument for this method
Returns:
a CallBack object corresponding to the appropriate method

getFastSingletonMethod

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

getSingletonMethod

public Callback getSingletonMethod(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:
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getFastSingletonMethod

public Callback getFastSingletonMethod(java.lang.String method,
                                       java.lang.Class arg1,
                                       java.lang.Class arg2)
Specified by:
getFastSingletonMethod in class CallbackFactory

getSingletonMethod

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

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

getFastSingletonMethod

public Callback getFastSingletonMethod(java.lang.String method,
                                       java.lang.Class arg1,
                                       java.lang.Class arg2,
                                       java.lang.Class arg3)
Specified by:
getFastSingletonMethod in class CallbackFactory

getBlockMethod

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

getBlockCallback

public CompiledBlockCallback getBlockCallback(java.lang.String method)
Specified by:
getBlockCallback in class CallbackFactory

getOptSingletonMethod

public Callback getOptSingletonMethod(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:
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getFastOptSingletonMethod

public Callback getFastOptSingletonMethod(java.lang.String method)
Specified by:
getFastOptSingletonMethod in class CallbackFactory

getOptMethod

public Callback getOptMethod(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:
method - name of the method
Returns:
a CallBack object corresponding to the appropriate method

getFastOptMethod

public Callback getFastOptMethod(java.lang.String method)
Specified by:
getFastOptMethod in class CallbackFactory


Copyright © 2002-2007 JRuby Team. All Rights Reserved.