jruby/docs BETA
Navigation
org.jruby.internal.runtime.methods.JavaMethod 42
C JavaMethodN
C JavaMethodNBlock
C JavaMethodOne
C JavaMethodOneBlock
C JavaMethodOneOrN
C JavaMethodOneOrNBlock
C JavaMethodOneOrTwo
C JavaMethodOneOrTwoBlock
C JavaMethodOneOrTwoOrN
C JavaMethodOneOrTwoOrNBlock
C JavaMethodOneOrTwoOrThree
C JavaMethodOneOrTwoOrThreeBlock
C JavaMethodOneOrTwoOrThreeOrN
C JavaMethodOneOrTwoOrThreeOrNBlock
C JavaMethodThree
C JavaMethodThreeBlock
C JavaMethodThreeOrN
C JavaMethodThreeOrNBlock
C JavaMethodTwo
C JavaMethodTwoBlock
C JavaMethodTwoOrN
C JavaMethodTwoOrNBlock
C JavaMethodTwoOrThree
C JavaMethodTwoOrThreeBlock
C JavaMethodTwoOrThreeOrN
C JavaMethodTwoOrThreeOrNBlock
C JavaMethodZero
C JavaMethodZeroBlock
C JavaMethodZeroOrN
C JavaMethodZeroOrNBlock
C JavaMethodZeroOrOne
C JavaMethodZeroOrOneBlock
C JavaMethodZeroOrOneOrN
C JavaMethodZeroOrOneOrNBlock
C JavaMethodZeroOrOneOrTwo
C JavaMethodZeroOrOneOrTwoBlock
C JavaMethodZeroOrOneOrTwoOrN
C JavaMethodZeroOrOneOrTwoOrNBlock
C JavaMethodZeroOrOneOrTwoOrThree
C JavaMethodZeroOrOneOrTwoOrThreeBlock
C JavaMethodZeroOrOneOrTwoOrThreeOrN
C JavaMethodZeroOrOneOrTwoOrThreeOrNBlock
JavaMethodTwoOrThree — members 4+
C new(implementation_class, visibility, name)
C new(implementation_class, visibility)
C new(implementation_class, visibility, call_config)
M call(context, self, clazz, name, args) IRubyObject
from DynamicMethod
C adjust_alias_count(delta)
M alias_count() int
M builtin?() boolean
M call(context, self, klazz, name) IRubyObject
M call(context, self, klazz, name, arg0) IRubyObject
M call_config() CallConfiguration
C call_config=(call_config)
M call_respond_to(context, self, respond_to_method_name, klazz, name) boolean
M defined_class() RubyModule
C defined_class=(defined_class)
M handle() Object
C handle=(handle)
M implementation_class() RubyModule
C implementation_class=(impl_class)
M instance_variable_names() Collection<String>
C is_builtin=(is_builtin)
M is_callable_from(caller, call_type) boolean
M is_implemented_by(other) boolean
M method_data() MethodData
M name() String
C not_implemented=(set_not_implemented)
M not_implemented?() boolean
M null?() boolean
M real_method() DynamicMethod
M refined?() boolean
M serial_number() long
C set_ruby2_keywords()
M undefined?() boolean
M visibility() Visibility
C visibility=(visibility)
from JavaMethod
F BLOCK_METHODS Class[][]
F BLOCK_REST_METHODS Class[][]
F METHODS Class[][]
F NAME_PASSER ThreadLocal<String>
F REST_METHODS Class[][]
M arity() Arity
C arity=(arity)
M caller_requirement() CallConfiguration
C caller_requirement=(caller_requirement)
M dup() DynamicMethod
M java_name() String
C java_name=(java_name)
M native?() boolean
M native_call() NativeCall
C parameter_desc=(parameter_desc)
M parameter_list() String[]
C parameter_list=(parameter_list)
C set_native_call(native_target, native_name, native_return, native_signature, statik, java)
C set_native_call(native_target, native_name, native_return, native_signature, statik)
M signature() Signature
C signature=(signature)
C singleton=(is_singleton)
M singleton?() boolean
M static_scope() StaticScope
from JavaMethodN
M call(context, self, clazz, name, block) IRubyObject
M call(context, self, clazz, name, arg0, block) IRubyObject
M call(context, self, clazz, name, args, block) IRubyObject
from JavaMethodTwoOrN
M call(context, self, clazz, name, arg0, arg1, block) IRubyObject
M call(context, self, clazz, name, arg0, arg1) IRubyObject
from JavaMethodTwoOrThreeOrN
M call(context, self, clazz, name, arg0, arg1, arg2, block) IRubyObject
M call(context, self, clazz, name, arg0, arg1, arg2) IRubyObject

org.jruby.internal.runtime.methods.JavaMethod.JavaMethodTwoOrThree

class abstract extends JavaMethod.JavaMethodTwoOrThreeOrN 4 members

Constructors

new

new ( RubyModule implementation_class, Visibility visibility, String name )
Java: <init>(org.jruby.RubyModule implementationClass, org.jruby.runtime.Visibility visibility, String name)

new

new ( RubyModule implementation_class, Visibility visibility )
Java: <init>(org.jruby.RubyModule implementationClass, org.jruby.runtime.Visibility visibility)

new

new ( RubyModule implementation_class, Visibility visibility, CallConfiguration call_config )
Java: <init>(org.jruby.RubyModule implementationClass, org.jruby.runtime.Visibility visibility, org.jruby.internal.runtime.methods.CallConfiguration callConfig)

Instance Methods

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject[] args)

Inherited

from DynamicMethod

adjust_alias_count

adjust_alias_count ( int delta )
Java: adjustAliasCount(int delta)

alias_count

int alias_count ( )
Java: getAliasCount() · also: get_alias_count

builtin?

boolean builtin? ( )
Java: isBuiltin() · also: is_builtin

Whether this method is a builtin method, i.e. a method built-in to JRuby and loaded during its core boot process.

Returns: true if this is a core built-in method, false otherwise

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule klazz, String name )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule klazz, String name)

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0 )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule klazz, String name, org.jruby.runtime.builtin.IRubyObject arg0)

call_config

CallConfiguration call_config ( )
Java: getCallConfig() · also: get_call_config

call_config=

call_config= ( CallConfiguration call_config )
Java: setCallConfig(org.jruby.internal.runtime.methods.CallConfiguration callConfig) · also: set_call_config

call_respond_to

boolean call_respond_to ( ThreadContext context, IRubyObject self, String respond_to_method_name, RubyModule klazz, RubySymbol name )
Java: callRespondTo(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, String respondToMethodName, org.jruby.RubyModule klazz, org.jruby.RubySymbol name)

defined_class

RubyModule defined_class ( )
Java: getDefinedClass() · also: get_defined_class

Get the original owner of this method/

Returns: the module method was defined in

defined_class=

defined_class= ( RubyModule defined_class )
Java: setDefinedClass(org.jruby.RubyModule definedClass) · also: set_defined_class

Set the defining class for this method, as when restructuring hierarchy for prepend.

nametypedescription
defined_classorg.jruby.RubyModulethat method was defined in

handle

Object handle ( )
Java: getHandle() · also: get_handle

Get the "handle" associated with this DynamicMethod.

Returns: the handle

handle=

handle= ( Object handle )
Java: setHandle(Object handle) · also: set_handle

Set the "handle" associated with this DynamicMethod.

nametypedescription
handleObjectthe handle

implementation_class

RubyModule implementation_class ( )
Java: getImplementationClass() · also: get_implementation_class

Retrieve the class or module on which this method is implemented, used for 'super' logic among others.

Returns: The class on which this method is implemented

implementation_class=

implementation_class= ( RubyModule impl_class )
Java: setImplementationClass(org.jruby.RubyModule implClass) · also: set_implementation_class

Set the class on which this method is implemented, used for 'super' logic, among others.

nametypedescription
impl_classorg.jruby.RubyModuleThe class on which this method is implemented

instance_variable_names

Collection<String> instance_variable_names ( )
Java: getInstanceVariableNames() · also: get_instance_variable_names

is_builtin=

is_builtin= ( boolean is_builtin )
Java: setIsBuiltin(boolean isBuiltin) · also: set_is_builtin

Force this method to be treated as a core built-in method if true, or as a normal non-core method otherwise.

nametypedescription
is_builtinbooleantrue if this is a core built-in method, false otherwise

is_callable_from

boolean is_callable_from ( IRubyObject caller, CallType call_type )
Java: isCallableFrom(org.jruby.runtime.builtin.IRubyObject caller, org.jruby.runtime.CallType callType)

Determine whether this method is callable from the given object using the given call type.

nametypedescription
callerorg.jruby.runtime.builtin.IRubyObjectThe calling object
call_typeorg.jruby.runtime.CallTypeThe type of call

Returns: true if the call would not violate visibility; false otherwise

is_implemented_by

boolean is_implemented_by ( RubyModule other )
Java: isImplementedBy(org.jruby.RubyModule other)

method_data

MethodData method_data ( )
Java: getMethodData() · also: get_method_data

Additional metadata about this method.

Returns: method data (defined in sub classes)

name

String name ( )
Java: getName() · also: get_name

Get the base name this method was defined as.

Returns: the base name for the method

not_implemented=

not_implemented= ( boolean set_not_implemented )
Java: setNotImplemented(boolean setNotImplemented) · also: set_not_implemented

Set whether this method is "not implemented".

nametypedescription
set_not_implementedbooleanis this not implement or not

not_implemented?

boolean not_implemented? ( )
Java: isNotImplemented() · also: is_not_implemented

Whether this method is "not implemented". This is primarily to support Ruby 1.9's behavior of respond_to? yielding false if the feature in question is unsupported (but still having the method defined).

Returns: is this a method which is marked as not implemented

null?

boolean null? ( )
Java: isNull() · also: is_null

Whether this method is the "null" method, used to stop method name resolution loops. Only returns true for NullMethod instances, of which there should be only one (a singleton).

Returns: true if this method is the undefined method; false otherwise

real_method

DynamicMethod real_method ( )
Java: getRealMethod() · also: get_real_method

Get the "real" method contained within this method. This simply returns self except in cases where a method is wrapped to give it a new name or new implementation class (AliasMethod, PartialDelegatingMethod, ...).

Returns: The "real" method associated with this one

refined?

boolean refined? ( )
Java: isRefined() · also: is_refined

serial_number

long serial_number ( )
Java: getSerialNumber() · also: get_serial_number

Get the global serial number for this method object

Returns: This method object's serial number

set_ruby2_keywords

set_ruby2_keywords ( )
Java: setRuby2Keywords()

Indicates the method will behave like a ruby2 keywords accepting method. This must be a Ruby implementation to work. See Module#ruby2_keywords for information on the semantics of a method which is marked this way.

undefined?

boolean undefined? ( )
Java: isUndefined() · also: is_undefined

Whether this method is the "undefined" method, used to represent a missing or undef'ed method. Only returns true for UndefinedMethod instances, of which there should be only one (a singleton).

Returns: true if this method is the undefined method; false otherwise

visibility

Visibility visibility ( )
Java: getVisibility() · also: get_visibility

Get the visibility of this method.

Returns: The visibility of this method

visibility=

visibility= ( Visibility visibility )
Java: setVisibility(org.jruby.runtime.Visibility visibility) · also: set_visibility

Set the visibility of this method.

nametypedescription
visibilityorg.jruby.runtime.VisibilityThe visibility of this method

from JavaMethod

fieldtypenote
BLOCK_METHODS Class[][]
BLOCK_REST_METHODS Class[][]
METHODS Class[][]
NAME_PASSER ThreadLocal<String> Used for old-style nameless constructor to pass name in out-of-band.
REST_METHODS Class[][]

arity

Arity arity ( )
Java: getArity() · also: get_arity

arity=

arity= ( Arity arity )
Java: setArity(org.jruby.runtime.Arity arity) · also: set_arity

caller_requirement

CallConfiguration caller_requirement ( )
Java: getCallerRequirement() · also: get_caller_requirement

caller_requirement=

caller_requirement= ( CallConfiguration caller_requirement )
Java: setCallerRequirement(org.jruby.internal.runtime.methods.CallConfiguration callerRequirement) · also: set_caller_requirement

dup

DynamicMethod dup ( )
Java: dup()

java_name

String java_name ( )
Java: getJavaName() · also: get_java_name

java_name=

java_name= ( String java_name )
Java: setJavaName(String javaName) · also: set_java_name

native?

boolean native? ( )
Java: isNative() · also: is_native

native_call

DynamicMethod.NativeCall native_call ( )
Java: getNativeCall() · also: get_native_call

parameter_desc=

parameter_desc= ( String parameter_desc )
Java: setParameterDesc(String parameterDesc) · also: set_parameter_desc

parameter_list

String[] parameter_list ( )
Java: getParameterList() · also: get_parameter_list

parameter_list=

parameter_list= ( String[] parameter_list )
Java: setParameterList(String[] parameterList) · also: set_parameter_list

set_native_call

set_native_call ( Class native_target, String native_name, Class native_return, Class[] native_signature, boolean statik, boolean java )
Java: setNativeCall(Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeSignature, boolean statik, boolean java)

set_native_call

set_native_call ( Class native_target, String native_name, Class native_return, Class[] native_signature, boolean statik )
Java: setNativeCall(Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeSignature, boolean statik)

signature

Signature signature ( )
Java: getSignature() · also: get_signature

signature=

signature= ( Signature signature )
Java: setSignature(org.jruby.runtime.Signature signature) · also: set_signature

singleton=

singleton= ( boolean is_singleton )
Java: setSingleton(boolean isSingleton) · also: set_singleton

singleton?

boolean singleton? ( )
Java: isSingleton() · also: is_singleton

static_scope

StaticScope static_scope ( )
Java: getStaticScope() · also: get_static_scope

from JavaMethod.JavaMethodN

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.Block block)

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

from JavaMethod.JavaMethodTwoOrN

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1 )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

from JavaMethod.JavaMethodTwoOrThreeOrN

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)

call

IRubyObject call ( ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2 )
Java: call(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.RubyModule clazz, String name, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)