Package org.jruby.java.invokers
Class ConstructorInvoker
java.lang.Object
org.jruby.internal.runtime.methods.DynamicMethod
org.jruby.internal.runtime.methods.JavaMethod
org.jruby.java.invokers.RubyToJavaInvoker
org.jruby.java.invokers.ConstructorInvoker
- All Implemented Interfaces:
Cloneable,MethodArgs2,NativeCallMethod
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.internal.runtime.methods.JavaMethod
JavaMethod.JavaMethodN, JavaMethod.JavaMethodNBlock, JavaMethod.JavaMethodOne, JavaMethod.JavaMethodOneBlock, JavaMethod.JavaMethodOneOrN, JavaMethod.JavaMethodOneOrNBlock, JavaMethod.JavaMethodOneOrTwo, JavaMethod.JavaMethodOneOrTwoBlock, JavaMethod.JavaMethodOneOrTwoOrN, JavaMethod.JavaMethodOneOrTwoOrNBlock, JavaMethod.JavaMethodOneOrTwoOrThree, JavaMethod.JavaMethodOneOrTwoOrThreeBlock, JavaMethod.JavaMethodOneOrTwoOrThreeOrN, JavaMethod.JavaMethodOneOrTwoOrThreeOrNBlock, JavaMethod.JavaMethodThree, JavaMethod.JavaMethodThreeBlock, JavaMethod.JavaMethodThreeOrN, JavaMethod.JavaMethodThreeOrNBlock, JavaMethod.JavaMethodTwo, JavaMethod.JavaMethodTwoBlock, JavaMethod.JavaMethodTwoOrN, JavaMethod.JavaMethodTwoOrNBlock, JavaMethod.JavaMethodTwoOrThree, JavaMethod.JavaMethodTwoOrThreeBlock, JavaMethod.JavaMethodTwoOrThreeOrN, JavaMethod.JavaMethodTwoOrThreeOrNBlock, JavaMethod.JavaMethodZero, JavaMethod.JavaMethodZeroBlock, JavaMethod.JavaMethodZeroOrN, JavaMethod.JavaMethodZeroOrNBlock, JavaMethod.JavaMethodZeroOrOne, JavaMethod.JavaMethodZeroOrOneBlock, JavaMethod.JavaMethodZeroOrOneOrN, JavaMethod.JavaMethodZeroOrOneOrNBlock, JavaMethod.JavaMethodZeroOrOneOrTwo, JavaMethod.JavaMethodZeroOrOneOrTwoBlock, JavaMethod.JavaMethodZeroOrOneOrTwoOrN, JavaMethod.JavaMethodZeroOrOneOrTwoOrNBlock, JavaMethod.JavaMethodZeroOrOneOrTwoOrThree, JavaMethod.JavaMethodZeroOrOneOrTwoOrThreeBlock, JavaMethod.JavaMethodZeroOrOneOrTwoOrThreeOrN, JavaMethod.JavaMethodZeroOrOneOrTwoOrThreeOrNBlockNested classes/interfaces inherited from class org.jruby.internal.runtime.methods.DynamicMethod
DynamicMethod.NativeCall, DynamicMethod.Version -
Field Summary
Fields inherited from class org.jruby.java.invokers.RubyToJavaInvoker
javaCallable, javaCallables, javaVarargsCallablesFields inherited from class org.jruby.internal.runtime.methods.JavaMethod
BLOCK_METHODS, BLOCK_REST_METHODS, METHODS, NAME_PASSER, nativeCall, REST, REST_METHODS, signature, staticScopeFields inherited from class org.jruby.internal.runtime.methods.DynamicMethod
aliasCount, definedClass, flags, handle, implementationClass, name, protectedClass, serialNumber -
Constructor Summary
ConstructorsConstructorDescriptionConstructorInvoker(RubyModule host, Supplier<Constructor[]> ctors, String name) -
Method Summary
Modifier and TypeMethodDescriptioncall(ThreadContext context, IRubyObject self, RubyModule clazz, String name) call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) A default implementation of n-arity, non-block 'call' method, which simply calls the n-arity, block-receiving version with the arg list and Block.NULL_BLOCK.call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) The minimum 'call' method required for a dynamic method handle.call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) protected JavaCallablecreateCallable(Ruby ruby, Member member) protected JavaCallable[]createCallableArray(int size) protected JavaCallable[]createCallableArray(JavaCallable callable) protected JavaCallable[][]createCallableArrayArray(int size) protected Class[]getMemberParameterTypes(Member member) protected booleanisMemberVarArgs(Member member) Deprecated.Methods inherited from class org.jruby.java.invokers.RubyToJavaInvoker
convertArguments, convertArguments, convertArguments, findCallable, findCallableArityFour, findCallableArityOne, findCallableArityThree, findCallableArityTwo, findCallableArityZero, getSignature, putSignatureMethods inherited from class org.jruby.internal.runtime.methods.JavaMethod
callTrace, callTraceCompiled, checkArgumentCount, dup, getArity, getCallerRequirement, getJavaName, getNativeCall, getParameterList, getSignature, getStaticScope, isNative, isSingleton, postBacktraceAndScope, postBacktraceDummyScope, postBacktraceOnly, postFrameAndScope, postFrameOnly, postNoFrameDummyScope, postNoop, postScopeOnly, preBacktraceAndScope, preBacktraceDummyScope, preBacktraceOnly, preFrameAndDummyScope, preFrameAndDummyScope, preFrameAndScope, preFrameAndScope, preFrameOnly, preFrameOnly, preNoFrameDummyScope, preNoop, preScopeOnly, raiseArgumentError, returnTrace, returnTraceCompiled, setArity, setCallerRequirement, setJavaName, setNativeCall, setNativeCall, setParameterDesc, setParameterList, setSignature, setSingletonMethods inherited from class org.jruby.internal.runtime.methods.DynamicMethod
adjustAliasCount, calculateProtectedClass, callRespondTo, getAliasCount, getCallConfig, getDefinedClass, getHandle, getImplementationClass, getInstanceVariableNames, getMethodData, getName, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, init, init, isBuiltin, isCallableFrom, isImplementedBy, isNotImplemented, isNull, isRefined, isUndefined, setCallConfig, setDefinedClass, setHandle, setImplementationClass, setIsBuiltin, setNotImplemented, setRuby2Keywords, setVisibility
-
Constructor Details
-
ConstructorInvoker
-
-
Method Details
-
createCallable
- Specified by:
createCallablein classRubyToJavaInvoker
-
createCallableArray
- Specified by:
createCallableArrayin classRubyToJavaInvoker
-
createCallableArray
- Specified by:
createCallableArrayin classRubyToJavaInvoker
-
createCallableArrayArray
- Specified by:
createCallableArrayArrayin classRubyToJavaInvoker
-
getMemberParameterTypes
- Specified by:
getMemberParameterTypesin classRubyToJavaInvoker
-
isMemberVarArgs
Deprecated.- Specified by:
isMemberVarArgsin classRubyToJavaInvoker
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) Description copied from class:DynamicMethodA default implementation of n-arity, non-block 'call' method, which simply calls the n-arity, block-receiving version with the arg list and Block.NULL_BLOCK.- Overrides:
callin classDynamicMethod- Parameters:
context- The thread context for the currently executing threadself- The 'self' or 'receiver' object to use for this callclazz- The Ruby class against which this method is bindingname- The incoming name used to invoke this methodargs- The first argument to this invocation- Returns:
- The result of the call
-
call
- Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) - Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) - Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) - Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) Description copied from class:DynamicMethodThe minimum 'call' method required for a dynamic method handle. Subclasses must implement this method, but may implement the other signatures to provide faster, non-boxing call paths. Typically subclasses will implement this method to check variable arity calls, then performing a specific-arity invocation to the appropriate method or performing variable-arity logic in-line.- Specified by:
callin classDynamicMethod- Parameters:
context- The thread context for the currently executing threadself- The 'self' or 'receiver' object to use for this callclazz- The Ruby class against which this method is bindingname- The incoming name used to invoke this methodargs- The argument list to this invocationblock- The block passed to this invocation- Returns:
- The result of the call
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) - Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) - Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) - Overrides:
callin classDynamicMethod
-
call
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) - Overrides:
callin classDynamicMethod
-