public class ReflectionMethodFactory extends MethodFactory
MethodFactory.MethodDefiningCallback
CAN_LOAD_BYTECODE, COMPILED_METHOD_PARAMS
Constructor and Description |
---|
ReflectionMethodFactory() |
Modifier and Type | Method and Description |
---|---|
DynamicMethod |
getAnnotatedMethod(RubyModule implementationClass,
JavaMethodDescriptor desc)
Use reflection to provide a method handle based on an annotated Java
method.
|
DynamicMethod |
getAnnotatedMethod(RubyModule implementationClass,
List<JavaMethodDescriptor> descs)
Use reflection to provide a method handle based on an annotated Java
method.
|
CompiledBlockCallback |
getBlockCallback(String method,
String file,
int line,
Object scriptObject)
Get a CompiledBlockCallback for the specified block
|
CompiledBlockCallback19 |
getBlockCallback19(String method,
String file,
int line,
Object scriptObject)
Get a CompiledBlockCallback for the specified block
|
DynamicMethod |
getCompiledMethod(RubyModule implementationClass,
String rubyName,
String javaName,
Arity arity,
Visibility visibility,
StaticScope scope,
Object scriptObject,
CallConfiguration callConfig,
ISourcePosition position,
String parameterDesc)
Use reflection to provide a method handle for a compiled Ruby method.
|
DynamicMethod |
getCompiledMethodLazily(RubyModule implementationClass,
String rubyName,
String javaName,
Arity arity,
Visibility visibility,
StaticScope scope,
Object scriptObject,
CallConfiguration callConfig,
ISourcePosition position,
String parameterDesc)
Use reflection to provide a method handle for a compiled Ruby method.
|
createFactory, getBlockCallback19Offline, getBlockCallbackOffline, getCompiledMethodOffline
public DynamicMethod getCompiledMethodLazily(RubyModule implementationClass, String rubyName, String javaName, Arity arity, Visibility visibility, StaticScope scope, Object scriptObject, CallConfiguration callConfig, ISourcePosition position, String parameterDesc)
getCompiledMethodLazily
in class MethodFactory
implementationClass
- The class to which the method will be bound.rubyName
- The Ruby method name to which the method will bindjavaName
- 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.internal.runtime.methods.MethodFactory
public DynamicMethod getCompiledMethod(RubyModule implementationClass, String rubyName, String javaName, Arity arity, Visibility visibility, StaticScope scope, Object scriptObject, CallConfiguration callConfig, ISourcePosition position, String parameterDesc)
getCompiledMethod
in class MethodFactory
implementationClass
- The class to which the method will be bound.rubyName
- The Ruby method name to which the method will bindjavaName
- 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.position
- The position to use when generating traceable handles.internal.runtime.methods.MethodFactory
public DynamicMethod getAnnotatedMethod(RubyModule implementationClass, JavaMethodDescriptor desc)
getAnnotatedMethod
in class MethodFactory
implementationClass
- The target class or module on which the method
will be bound.desc
- A JavaMethodDescriptor describing the target methodinternal.runtime.methods.MethodFactory
public DynamicMethod getAnnotatedMethod(RubyModule implementationClass, List<JavaMethodDescriptor> descs)
getAnnotatedMethod
in class MethodFactory
implementationClass
- The target class or module on which the method
will be bound.internal.runtime.methods.MethodFactory
public CompiledBlockCallback getBlockCallback(String method, String file, int line, Object scriptObject)
MethodFactory
getBlockCallback
in class MethodFactory
method
- The name of the methodscriptObject
- The object in which the method can be foundpublic CompiledBlockCallback19 getBlockCallback19(String method, String file, int line, Object scriptObject)
MethodFactory
getBlockCallback19
in class MethodFactory
method
- The name of the methodscriptObject
- The object in which the method can be foundCopyright © 2001-2013 JRuby. All Rights Reserved.