|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.runtime.MethodFactory
org.jruby.internal.runtime.methods.ReflectionMethodFactory
public class ReflectionMethodFactory
This MethodFactory uses reflection to provide method handles. Reflection is typically slower than code-generated handles, but it does provide a simple mechanism for binding in environments where code-generation isn't supported.
org.jruby.internal.runtime.methods.MethodFactory| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jruby.runtime.MethodFactory |
|---|
MethodFactory.MethodDefiningCallback |
| Field Summary |
|---|
| Fields inherited from class org.jruby.runtime.MethodFactory |
|---|
COMPILED_METHOD_PARAMS |
| Constructor Summary | |
|---|---|
ReflectionMethodFactory()
|
|
| Method Summary | |
|---|---|
void |
defineIndexedAnnotatedMethods(RubyModule implementationClass,
java.lang.Class type,
MethodFactory.MethodDefiningCallback callback)
Deprecated. |
DynamicMethod |
getAnnotatedMethod(RubyModule implementationClass,
JavaMethodDescriptor desc)
Use reflection to provide a method handle based on an annotated Java method. |
DynamicMethod |
getAnnotatedMethod(RubyModule implementationClass,
java.util.List<JavaMethodDescriptor> descs)
Use reflection to provide a method handle based on an annotated Java method. |
DynamicMethod |
getCompiledMethod(RubyModule implementationClass,
java.lang.String methodName,
Arity arity,
Visibility visibility,
StaticScope scope,
java.lang.Object scriptObject,
CallConfiguration callConfig)
Use reflection to provide a method handle for a compiled Ruby method. |
DynamicMethod |
getCompiledMethodLazily(RubyModule implementationClass,
java.lang.String methodName,
Arity arity,
Visibility visibility,
StaticScope scope,
java.lang.Object scriptObject,
CallConfiguration callConfig)
Use reflection to provide a method handle for a compiled Ruby method. |
| Methods inherited from class org.jruby.runtime.MethodFactory |
|---|
createFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectionMethodFactory()
| Method Detail |
|---|
public DynamicMethod getCompiledMethodLazily(RubyModule implementationClass,
java.lang.String methodName,
Arity arity,
Visibility visibility,
StaticScope scope,
java.lang.Object scriptObject,
CallConfiguration callConfig)
getCompiledMethodLazily in class MethodFactoryimplementationClass - The class to which the method will be bound.methodName - The name of the methodarity - The Arity of the methodvisibility - The method's visibility on the target type.scope - The methods static scoping information.scriptObject - An instace of the target compiled method class.callConfig - The call configuration to use for this method.
org.jruby.internal.runtime.methods.MethodFactory#getCompiledMethod
public DynamicMethod getCompiledMethod(RubyModule implementationClass,
java.lang.String methodName,
Arity arity,
Visibility visibility,
StaticScope scope,
java.lang.Object scriptObject,
CallConfiguration callConfig)
getCompiledMethod in class MethodFactoryimplementationClass - The class to which the method will be bound.methodName - The name of the methodarity - The Arity of the methodvisibility - The method's visibility on the target type.scope - The methods static scoping information.scriptObject - An instace of the target compiled method class.callConfig - The call configuration to use for this method.
org.jruby.internal.runtime.methods.MethodFactory#getCompiledMethod
public DynamicMethod getAnnotatedMethod(RubyModule implementationClass,
JavaMethodDescriptor desc)
getAnnotatedMethod in class MethodFactoryimplementationClass - The target class or module on which the method
will be bound.desc - A JavaMethodDescriptor describing the target method
org.jruby.internal.runtime.methods.MethodFactory#getAnnotatedMethod
public DynamicMethod getAnnotatedMethod(RubyModule implementationClass,
java.util.List<JavaMethodDescriptor> descs)
getAnnotatedMethod in class MethodFactoryimplementationClass - The target class or module on which the method
will be bound.
org.jruby.internal.runtime.methods.MethodFactory#getAnnotatedMethod
@Deprecated
public void defineIndexedAnnotatedMethods(RubyModule implementationClass,
java.lang.Class type,
MethodFactory.MethodDefiningCallback callback)
defineIndexedAnnotatedMethods in class MethodFactoryimplementationClass - The target class or module on which the method
will be bound.type - The Java class containined annotated methods to
be bound.callback - A callback provided by the caller which handles binding
each method.org.jruby.internal.runtime.methods.MethodFactory#defineIndexedAnnotatedMethods
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||