Top Fields Constructors Methods
org.jruby.internal.runtime.methods

public Class MethodMethod

extends DynamicMethod
Class Inheritance
Imports
org.jruby.RubyModule, .RubyUnboundMethod, org.jruby.runtime.Block, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject

Field Summary

Modifier and TypeField and Description
private final RubyUnboundMethod
Inherited from org.jruby.internal.runtime.methods.DynamicMethod:
aliasCountdefinedClassflagshandleimplementationClassnameprotectedClassserialNumber

Constructor Summary

AccessConstructor and Description
public
MethodMethod(RubyModule implementationClass, RubyUnboundMethod method, Visibility visibility)

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
klazz
,
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 DynamicMethod
dup()

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

Duplicate this method, returning DynamicMethod referencing the same code and with the same attributes.

public DynamicMethod
getRealMethod()

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

Get the "real" method contained within this method.

Inherited from org.jruby.internal.runtime.methods.DynamicMethod:
adjustAliasCountcalculateProtectedClasscallcallcallcallcallcallcallcallcallcallRespondTogetAliasCountgetAritygetCallConfiggetDefinedClassgetHandlegetImplementationClassgetInstanceVariableNamesgetMethodDatagetNamegetProtectedClassgetSerialNumbergetSignaturegetVisibilityinitinitisBuiltinisCallableFromisImplementedByisNativeisNotImplementedisNullisRefinedisUndefinedsetCallConfigsetDefinedClasssetHandlesetImplementationClasssetIsBuiltinsetNotImplementedsetRuby2KeywordssetVisibility

Field Detail

methodback to summary
private final RubyUnboundMethod method

Constructor Detail

MethodMethodback to summary
public MethodMethod(RubyModule implementationClass, RubyUnboundMethod method, Visibility visibility)

Method Detail

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, 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

klazz: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

dupback to summary
public DynamicMethod dup()

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

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

Duplicate this method, returning DynamicMethod referencing the same code and with the same attributes. It is not required that this method produce a new object if the semantics of the DynamicMethod subtype do not require such.

Returns:DynamicMethod

An identical DynamicMethod object to the target.

getRealMethodback to summary
public DynamicMethod getRealMethod()

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

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

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:DynamicMethod

The "real" method associated with this one

Annotations
@Override