|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.runtime.CallbackFactory
Helper class to build Callback method. This impements method corresponding to the signature of method most often found in the Ruby library, for methods with other signature the appropriate Callback object will need to be explicitly created.
Field Summary | |
static java.lang.Class[] |
NULL_CLASS_ARRAY
|
Constructor Summary | |
CallbackFactory()
|
Method Summary | |
static CallbackFactory |
createFactory()
|
abstract Callback |
getBlockMethod(java.lang.Class type,
java.lang.String method)
|
Callback |
getFalseMethod(int arity)
|
abstract Callback |
getMethod(java.lang.Class type,
java.lang.String method)
gets an instance method with no arguments. |
abstract Callback |
getMethod(java.lang.Class type,
java.lang.String method,
java.lang.Class arg1)
gets an instance method with 1 argument. |
abstract 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 |
getNilMethod(int arity)
|
abstract Callback |
getOptMethod(java.lang.Class type,
java.lang.String method)
gets an instance method with no mandatory argument and some optional arguments. |
abstract 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. |
abstract Callback |
getOptSingletonMethod(java.lang.Class type,
java.lang.String method)
gets a singleton (class) method with no mandatory argument and some optional arguments. |
abstract 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. |
abstract 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 |
getSelfMethod(int arity)
|
abstract Callback |
getSingletonMethod(java.lang.Class type,
java.lang.String method)
gets a singleton (class) method without arguments. |
abstract Callback |
getSingletonMethod(java.lang.Class type,
java.lang.String method,
java.lang.Class arg1)
gets a singleton (class) method with 1 argument. |
abstract 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. |
Callback |
getTrueMethod(int arity)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Class[] NULL_CLASS_ARRAY
Constructor Detail |
public CallbackFactory()
Method Detail |
public abstract Callback getMethod(java.lang.Class type, java.lang.String method)
type
- java class where the method is implementedmethod
- name of the method
public abstract Callback getMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
type
- java class where the method is implementedmethod
- name of the methodarg1
- the class of the only argument for this method
public abstract Callback getMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
type
- java class where the method is implementedmethod
- name of the methodarg1
- the java class of the first argument for this methodarg2
- the java class of the second argument for this method
public abstract Callback getSingletonMethod(java.lang.Class type, java.lang.String method)
type
- java class where the method is implementedmethod
- name of the method
public abstract Callback getSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
type
- java class where the method is implementedmethod
- name of the methodarg1
- the class of the only argument for this method
public abstract Callback getSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1, java.lang.Class arg2)
type
- java class where the method is implementedmethod
- name of the method
public abstract Callback getBlockMethod(java.lang.Class type, java.lang.String method)
public abstract Callback getOptSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
type
- java class where the method is implementedmethod
- name of the methodarg1
- the class of the only mandatory argument for this method
public abstract Callback getOptSingletonMethod(java.lang.Class type, java.lang.String method, java.lang.Class[] args)
type
- java class where the method is implementedmethod
- name of the methodargs
- an array of java class of the mandatory arguments (NOTE: this must include
the appropriate rest argument class (usually a RubyObject[].class))
public abstract Callback getOptSingletonMethod(java.lang.Class type, java.lang.String method)
type
- java class where the method is implementedmethod
- name of the method
public abstract Callback getOptMethod(java.lang.Class type, java.lang.String method)
type
- java class where the method is implementedmethod
- name of the method
public abstract Callback getOptMethod(java.lang.Class type, java.lang.String method, java.lang.Class arg1)
type
- java class where the method is implementedmethod
- name of the methodarg1
- the class of the only mandatory argument for this method
public Callback getFalseMethod(int arity)
public Callback getTrueMethod(int arity)
public Callback getNilMethod(int arity)
public Callback getSelfMethod(int arity)
public static CallbackFactory createFactory()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |