Top Fields Constructors Methods
org.jruby.java.invokers

public final Class ConstructorInvoker

extends RubyToJavaInvoker
Class Inheritance
Imports
java.lang.reflect.Constructor, .Member, java.util.function.Supplier, org.jruby.Ruby, .RubyModule, .RubyProc, org.jruby.java.proxies.JavaProxy, org.jruby.javasupport.Java, .JavaCallable, .JavaConstructor, org.jruby.runtime.Block, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ArraySupport

Field Summary

Inherited from org.jruby.java.invokers.RubyToJavaInvoker:
cacheinitializedjavaCallablejavaCallablesjavaVarargsCallablesNULL_CACHE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
call(ThreadContext
The thread context for the currently executing thread
context
,
IRubyObject
The 'self' or 'receiver' object to use for this call
self
,
RubyModule
The Ruby class against which this method is binding
clazz
,
String
The incoming name used to invoke this method
name
,
IRubyObject[]
The first argument to this invocation
args
)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

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.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
call(ThreadContext
The thread context for the currently executing thread
context
,
IRubyObject
The 'self' or 'receiver' object to use for this call
self
,
RubyModule
The Ruby class against which this method is binding
clazz
,
String
The incoming name used to invoke this method
name
,
IRubyObject[]
The argument list to this invocation
args
,
Block
The block passed to this invocation
block
)

Implements abstract org.jruby.internal.runtime.methods.DynamicMethod.call.

The minimum 'call' method required for a dynamic method handle.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
protected JavaCallable
protected JavaCallable[]
protected JavaCallable[]
protected JavaCallable[][]
protected Class<T>[]
protected boolean
private static void
Inherited from org.jruby.java.invokers.RubyToJavaInvoker:
castJavaProxyconvertArgumentsconvertArgumentsconvertArgumentsfindCallablefindCallableArityFourfindCallableArityOnefindCallableArityThreefindCallableArityTwofindCallableArityZerogetMemberAritygetSignatureinitializenewErrorDueArgumentTypeMismatchputSignaturesetAccessiblesetAccessiblesetupNativeCallunwrapIfJavaProxy

Constructor Detail

ConstructorInvokerback to summary
public ConstructorInvoker(RubyModule host, Supplier<Constructor<T>[]> ctors, String name)

Method Detail

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Doc from org.jruby.internal.runtime.methods.DynamicMethod.call.

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.

Parameters
context:ThreadContext

The thread context for the currently executing thread

self:IRubyObject

The 'self' or 'receiver' object to use for this call

clazz:RubyModule

The Ruby class against which this method is binding

name:String

The incoming name used to invoke this method

args:IRubyObject[]

The first argument to this invocation

Returns:IRubyObject

The result of the call

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block)

Implements abstract org.jruby.internal.runtime.methods.DynamicMethod.call.

Doc from org.jruby.internal.runtime.methods.DynamicMethod.call.

The 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.

Parameters
context:ThreadContext

The thread context for the currently executing thread

self:IRubyObject

The 'self' or 'receiver' object to use for this call

clazz:RubyModule

The Ruby class against which this method is binding

name:String

The incoming name used to invoke this method

args:IRubyObject[]

The argument list to this invocation

block:Block

The block passed to this invocation

Returns:IRubyObject

The result of the call

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
createCallableback to summary
protected JavaCallable createCallable(Ruby ruby, Member member)

Implements abstract org.jruby.java.invokers.RubyToJavaInvoker.createCallable.

Annotations
@Override
createCallableArrayback to summary
protected JavaCallable[] createCallableArray(JavaCallable callable)

Implements abstract org.jruby.java.invokers.RubyToJavaInvoker.createCallableArray.

Annotations
@Override
createCallableArrayback to summary
protected JavaCallable[] createCallableArray(int size)

Implements abstract org.jruby.java.invokers.RubyToJavaInvoker.createCallableArray.

Annotations
@Override
createCallableArrayArrayback to summary
protected JavaCallable[][] createCallableArrayArray(int size)

Implements abstract org.jruby.java.invokers.RubyToJavaInvoker.createCallableArrayArray.

Annotations
@Override
getMemberParameterTypesback to summary
protected Class<T>[] getMemberParameterTypes(Member member)

Implements abstract org.jruby.java.invokers.RubyToJavaInvoker.getMemberParameterTypes.

Annotations
@Override
isMemberVarArgsback to summary
protected boolean isMemberVarArgs(Member member)

Implements abstract org.jruby.java.invokers.RubyToJavaInvoker.isMemberVarArgs.

Deprecated

Annotations
@Override
@Deprecated
setAndCacheProxyObjectback to summary
private static void setAndCacheProxyObject(ThreadContext context, RubyModule clazz, JavaProxy proxy, Object object)