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

public abstract Class JavaMethod

extends DynamicMethod
implements Cloneable, MethodArgs2, NativeCallMethod
Class Inheritance
All Implemented Interfaces
org.jruby.internal.runtime.methods.NativeCallMethod, org.jruby.internal.runtime.methods.MethodArgs2, java.lang.Cloneable
Known Direct Subclasses
org.jruby.internal.runtime.methods.JavaMethod.JavaMethodNBlock, org.jruby.java.invokers.RubyToJavaInvoker, org.jruby.java.proxies.ConcreteJavaProxy.InitializeMethod, org.jruby.java.proxies.ConcreteJavaProxy.NewMethod, org.jruby.java.proxies.JavaInterfaceTemplate.DummyMethodImpl, org.jruby.java.proxies.JavaInterfaceTemplate.BlockInterfaceImpl, org.jruby.java.proxies.JavaInterfaceTemplate.BlockInterfaceImpl.ConcreteMethod, org.jruby.javasupport.Java.JavaAccessor, org.jruby.javasupport.Java.ProcToInterface.ConcreteMethod, org.jruby.javasupport.binding.MethodGatherer.NoConstructorMethod
Imports
org.jruby.RubyModule, org.jruby.parser.StaticScope, org.jruby.runtime.Arity, .Block, .Helpers, .RubyEvent, .Signature, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class
public abstract static class

Field Summary

Modifier and TypeField and Description
public static final Class<T>[][]
public static final Class<T>[][]
private boolean
private String
public static final Class<T>[][]
public static final ThreadLocal<String>
NAME_PASSER

Deprecated
Used for old-style nameless constructor to pass name in out-of-band.
protected DynamicMethod.NativeCall
nativeCall

Single-arity native call

private static final String[]
private String
private String[]
protected static final String[]
public static final Class<T>[][]
protected Signature
protected StaticScope
private static final String[]
private static final String[]
Inherited from org.jruby.internal.runtime.methods.DynamicMethod:
aliasCountdefinedClassflagshandleimplementationClassnameprotectedClassserialNumber

Constructor Summary

AccessConstructor and Description
public
JavaMethod(RubyModule implementationClass, Visibility visibility, String name)

public
JavaMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig)
Deprecated

public
JavaMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig, String name)
Deprecated

public
JavaMethod(RubyModule implementationClass, Visibility visibility)
Deprecated

Method Summary

Modifier and TypeMethod and Description
protected final void
callTrace(ThreadContext context, boolean enabled, String name)

protected final void
callTraceCompiled(ThreadContext context, boolean enabled, String name, String file, int line)

protected static void
checkArgumentCount(JavaMethod method, ThreadContext context, String name, IRubyObject[] args, int num)

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 Arity
getArity()

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

Deprecated

Retrieve the arity of this method, used for reporting arity to Ruby code.

public CallConfiguration
getCallerRequirement()
Deprecated

public String
public DynamicMethod.NativeCall
getNativeCall()

Implements org.jruby.internal.runtime.methods.NativeCallMethod.getNativeCall.

Get the NativeCall for the method, if available.

public String[]
public Signature
getSignature()

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

Retrieve the signature of this method.

public StaticScope
public boolean
isNative()

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

Returns true if this method is backed by native (i.e. Java) code.

public boolean
protected static final void
protected static final void
protected static final void
protected static final void
protected static final void
protected static final void
protected static final void
protected static final void
protected final void
protected final void
protected final void
protected final void
preFrameAndDummyScope(ThreadContext context, IRubyObject self, RubyModule frameClass, String name, Block block)

protected final void
preFrameAndDummyScope(ThreadContext context, IRubyObject self, String name, Block block)
Deprecated

protected final void
preFrameAndScope(ThreadContext context, IRubyObject self, RubyModule frameClass, String name, Block block)

protected final void
preFrameAndScope(ThreadContext context, IRubyObject self, String name, Block block)
Deprecated

protected final void
preFrameOnly(ThreadContext context, IRubyObject self, RubyModule frameClass, String name, Block block)

protected final void
preFrameOnly(ThreadContext context, IRubyObject self, String name, Block block)
Deprecated

protected final void
protected final void
protected final void
protected static IRubyObject
raiseArgumentError(JavaMethod method, ThreadContext context, String name, int given, int min, int max)

protected final void
returnTrace(ThreadContext context, boolean enabled, String name)

protected final void
returnTraceCompiled(ThreadContext context, boolean enabled, String name)

public void
setArity(Arity arity)
Deprecated

public void
setCallerRequirement(CallConfiguration callerRequirement)
Deprecated

public void
setJavaName(String javaName)

public void
setNativeCall(Class<T>
native method target
nativeTarget
,
String
native method name
nativeName
,
Class<T>
native method return
nativeReturn
,
Class<T>[]
native method arguments
nativeSignature
,
boolean
static?
statik
,
boolean
plain Java method?
java
)

Implements org.jruby.internal.runtime.methods.NativeCallMethod.setNativeCall.

Set the single-arity NativeCall for this method.

public void
setNativeCall(Class<T>
native method target
nativeTarget
,
String
native method name
nativeName
,
Class<T>
native method return
nativeReturn
,
Class<T>[]
native method arguments
nativeSignature
,
boolean
static?
statik
)

Implements org.jruby.internal.runtime.methods.NativeCallMethod.setNativeCall.

Set the single-arity NativeCall for this method.

public void
setParameterDesc(String parameterDesc)

public void
setParameterList(String[] parameterList)

public void
public void
setSingleton(boolean isSingleton)

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