Package org.jruby.javasupport
Class JavaMethod
java.lang.Object
org.jruby.javasupport.JavaAccessibleObject
org.jruby.javasupport.JavaCallable
org.jruby.javasupport.JavaMethod
- All Implemented Interfaces:
ParameterTypes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<?>private final booleanprivate final Methodprivate final JavaUtil.JavaConverterFields inherited from class org.jruby.javasupport.JavaCallable
parameterTypes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AccessibleObjectprivate voidcheckInstanceof(Ruby runtime, Object javaInvokee) private IRubyObjectconvertReturn(Ruby runtime, Object result) static JavaMethodDeprecated.static JavaMethodstatic JavaMethodcreateDeclared(Ruby runtime, Class<?> javaClass, String methodName, Class<?>[] argumentTypes) Deprecated.static RubyClasscreateJavaMethodClass(Ruby runtime, RubyModule javaModule) final booleanfinal_p(ThreadContext context) Class<?>[]Type[]Type[]static JavaMethodgetMatchingDeclaredMethod(Ruby runtime, Class<?> javaClass, String methodName, Class<?>[] argumentTypes) final intgetName()Annotation[][]final MethodgetValue()final inthashCode()invoke(ThreadContext context, IRubyObject[] args) invoke_static(ThreadContext context, IRubyObject[] args) invokeDirect(ThreadContext context, Object javaInvokee) invokeDirect(ThreadContext context, Object javaInvokee, Object arg0) invokeDirect(ThreadContext context, Object javaInvokee, Object[] args) invokeDirect(ThreadContext context, Object javaInvokee, Object arg0, Object arg1) invokeDirect(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2) invokeDirect(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) invokeDirectSuperWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object... arguments) private IRubyObjectinvokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee) private IRubyObjectinvokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0) invokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object[] arguments) private IRubyObjectinvokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0, Object arg1) private IRubyObjectinvokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0, Object arg1, Object arg2) private IRubyObjectinvokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) invokeStaticDirect(ThreadContext context) invokeStaticDirect(ThreadContext context, Object arg0) invokeStaticDirect(ThreadContext context, Object[] args) invokeStaticDirect(ThreadContext context, Object arg0, Object arg1) invokeStaticDirect(ThreadContext context, Object arg0, Object arg1, Object arg2) invokeStaticDirect(ThreadContext context, Object arg0, Object arg1, Object arg2, Object arg3) private IRubyObjectinvokeWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object[] arguments) private booleanisStatic()final booleanprivate booleanmightBeProxy(Object javaInvokee) name(ThreadContext context) static RaiseExceptionnewArgSizeMismatchError(Ruby runtime, Class... argTypes) static RaiseExceptionnewMethodNotFoundError(Ruby runtime, Class target, String prettyName, String simpleName) public_p(ThreadContext context) return_type(ThreadContext context) static_p(ThreadContext context) private IRubyObjecttryProxyInvocation(ThreadContext context, Object javaInvokee) private IRubyObjecttryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0) private IRubyObjecttryProxyInvocation(ThreadContext context, Object javaInvokee, Object... args) private IRubyObjecttryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1) private IRubyObjecttryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2) private IRubyObjecttryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) type_parameters(ThreadContext context) Methods inherited from class org.jruby.javasupport.JavaCallable
arity, checkArity, convertArguments, convertArguments, dumpArgTypes, exception_types, generic_exception_types, generic_parameter_types, getArity, getParameterTypes, handleIllegalAccessEx, handleIllegalAccessEx, handleInvocationTargetEx, handlelIllegalArgumentEx, handlelIllegalArgumentEx, handlelIllegalArgumentEx, handleThrowable, inspectParameterTypes, parameter_annotations, parameter_types, registerRubyMethods, to_generic_string, varargs_pMethods inherited from class org.jruby.javasupport.JavaAccessibleObject
annotation, annotation_present_p, annotations, annotations_p, declared_annotations, declared_annotations_p, declaring_class, hash, isAccessible, modifiers, op_equal, same, same, setAccessible, synthetic_p, to_string, toString
-
Field Details
-
method
-
boxedReturnType
-
isFinal
private final boolean isFinal -
returnConverter
-
-
Constructor Details
-
JavaMethod
-
-
Method Details
-
getValue
-
createJavaMethodClass
-
create
-
create
@Deprecated public static JavaMethod create(Ruby runtime, Class<?> javaClass, String methodName, Class<?>[] argumentTypes) Deprecated. -
createDeclared
@Deprecated public static JavaMethod createDeclared(Ruby runtime, Class<?> javaClass, String methodName, Class<?>[] argumentTypes) Deprecated. -
getMatchingDeclaredMethod
public static JavaMethod getMatchingDeclaredMethod(Ruby runtime, Class<?> javaClass, String methodName, Class<?>[] argumentTypes) -
equals
- Overrides:
equalsin classJavaAccessibleObject
-
hashCode
public final int hashCode()- Overrides:
hashCodein classJavaAccessibleObject
-
name
- Overrides:
namein classJavaAccessibleObject
-
public_p
- Overrides:
public_pin classJavaCallable
-
final_p
-
invoke
-
invoke_static
-
return_type
-
type_parameters
-
invokeDirect
-
invokeDirect
-
invokeDirect
-
invokeDirect
public IRubyObject invokeDirect(ThreadContext context, Object javaInvokee, Object arg0, Object arg1) -
invokeDirect
public IRubyObject invokeDirect(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2) -
invokeDirect
public IRubyObject invokeDirect(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) -
invokeStaticDirect
-
invokeStaticDirect
-
invokeStaticDirect
-
invokeStaticDirect
-
invokeStaticDirect
-
invokeStaticDirect
public IRubyObject invokeStaticDirect(ThreadContext context, Object arg0, Object arg1, Object arg2, Object arg3) -
checkInstanceof
- Throws:
RaiseException
-
invokeWithExceptionHandling
private IRubyObject invokeWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object[] arguments) -
invokeDirectSuperWithExceptionHandling
public IRubyObject invokeDirectSuperWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object... arguments) -
invokeDirectWithExceptionHandling
public IRubyObject invokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object[] arguments) -
invokeDirectWithExceptionHandling
private IRubyObject invokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee) -
invokeDirectWithExceptionHandling
private IRubyObject invokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0) -
invokeDirectWithExceptionHandling
private IRubyObject invokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0, Object arg1) -
invokeDirectWithExceptionHandling
private IRubyObject invokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0, Object arg1, Object arg2) -
invokeDirectWithExceptionHandling
private IRubyObject invokeDirectWithExceptionHandling(ThreadContext context, Method method, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) -
convertReturn
-
getName
-
getExceptionTypes
- Specified by:
getExceptionTypesin interfaceParameterTypes- Specified by:
getExceptionTypesin classJavaCallable
-
getGenericParameterTypes
- Specified by:
getGenericParameterTypesin classJavaCallable
-
getGenericExceptionTypes
- Specified by:
getGenericExceptionTypesin classJavaCallable
-
getParameterAnnotations
- Specified by:
getParameterAnnotationsin classJavaCallable
-
isVarArgs
public final boolean isVarArgs()- Specified by:
isVarArgsin interfaceParameterTypes- Specified by:
isVarArgsin classJavaCallable
-
static_p
-
isStatic
private boolean isStatic() -
getModifiers
public final int getModifiers()- Specified by:
getModifiersin classJavaCallable
-
toGenericString
- Specified by:
toGenericStringin classJavaCallable
-
accessibleObject
- Specified by:
accessibleObjectin classJavaAccessibleObject
-
mightBeProxy
-
tryProxyInvocation
-
tryProxyInvocation
-
tryProxyInvocation
-
tryProxyInvocation
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1) -
tryProxyInvocation
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2) -
tryProxyInvocation
private IRubyObject tryProxyInvocation(ThreadContext context, Object javaInvokee, Object arg0, Object arg1, Object arg2, Object arg3) -
newMethodNotFoundError
public static RaiseException newMethodNotFoundError(Ruby runtime, Class target, String prettyName, String simpleName) -
newArgSizeMismatchError
-