| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static @interface |
| Modifier and Type | Field and Description |
|---|---|
| protected int | aliasCount
How many times has this method been aliased. |
| private static final int | |
| protected RubyModule | definedClass
The module or class that originally defined this method. |
| protected byte | flags
Flags for builtin, notimpl, etc |
| protected Object | handle
An arbitrarily-typed "method handle" for use by compilers and call sites |
| protected RubyModule | implementationClass
The Ruby module or class from which this method should `super`. |
| protected final String | name
The simple, base name this method was defined under. |
| private static final int | |
| protected RubyModule | protectedClass
The "protected class" used for calculating protected access. |
| private static final int | |
| protected long | serialNumber
The serial number for this method object, to globally identify it |
| private byte | visibility
The visibility of this method. |
| Access | Constructor and Description |
|---|---|
| protected | DynamicMethod(RubyModule
The class to which this method will be
immediately bound implementationClass, Visibility The visibility assigned to this method visibility, String The simple name of this method name)Base constructor for dynamic method handles with names. |
| protected | DynamicMethod(String
the name of the method name)A no-arg constructor used only by the UndefinedMethod subclass and CompiledMethod handles. |
| protected | DynamicMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig)
Deprecated
|
| protected | DynamicMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig, String name)
Deprecated
|
| protected | DynamicMethod(RubyModule
of the method implementationClass, Visibility of the method visibility)
Deprecated
Use
DynamicMethod#DynamicMethod(RubyModule, Visibility, String)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected static RubyModule | Returns: The class to be used for protected access checking.The class from which to calculate cls)Calculate, based on given RubyModule, which class in its hierarchy should be used to determine protected access. |
| public abstract IRubyObject | Returns: The result of the callThe 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)The minimum 'call' method required for a dynamic method handle. |
| public IRubyObject | Returns: The result of the callThe 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)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 | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, Block block)
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1)
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1, Block block)
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
|
| public boolean | callRespondTo(ThreadContext context, IRubyObject self, String respondToMethodName, RubyModule klazz, RubySymbol name)
|
| public abstract DynamicMethod | Returns: An identical DynamicMethod object to the target.Duplicate this method, returning DynamicMethod referencing the same code and with the same attributes. |
| public int | |
| public Arity | Returns: The arity of the method, as reported to Ruby consumers.
Deprecated
Retrieve the arity of this method, used for reporting arity to Ruby code. |
| public CallConfiguration | |
| public RubyModule | |
| public Object | |
| public RubyModule | Returns: The class on which this method is implementedRetrieve the class or module on which this method is implemented, used for 'super' logic among others. |
| public Collection | |
| public MethodData | |
| public String | |
| protected RubyModule | Returns: The "protected class" for access checks.Retrieve the pre-calculated "protected class" used for access checks. |
| public DynamicMethod | Returns: The "real" method associated with this oneGet the "real" method contained within this method. |
| public long | Returns: This method object's serial numberGet the global serial number for this method object |
| public Signature | |
| public Visibility | |
| protected void | |
| protected void | init(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig)
Deprecated
|
| public boolean | Returns: true if this is a core built-in method, false otherwiseWhether this method is a builtin method, i.e. a method built-in to JRuby and loaded during its core boot process. |
| public boolean | Returns: true if the call would not violate visibility; false otherwiseThe calling object caller, CallType The type of call callType)Determine whether this method is callable from the given object using the given call type. |
| public boolean | |
| public boolean | Returns: true If backed by Java code or JVM bytecode; false otherwiseReturns true if this method is backed by native (i.e. Java) code. |
| public boolean | Returns: is this a method which is marked as not implementedWhether this method is "not implemented". |
| public final boolean | Returns: true if this method is the undefined method; false otherwiseWhether this method is the "null" method, used to stop method name resolution loops. |
| public boolean | |
| public final boolean | Returns: true if this method is the undefined method; false otherwiseWhether this method is the "undefined" method, used to represent a missing or undef'ed method. |
| private boolean | Returns: true if the calling object can call protected methods; false otherwiseThe calling object caller)Determine whether the given object can safely invoke protected methods on the class this method is bound to. |
| public void | |
| public void | setDefinedClass(RubyModule
that method was defined in definedClass)Set the defining class for this method, as when restructuring hierarchy for prepend. |
| public void | |
| public void | setImplementationClass(RubyModule
The class on which this method is implemented implClass)Set the class on which this method is implemented, used for 'super' logic, among others. |
| public void | setIsBuiltin(boolean
true if this is a core built-in method, false otherwise isBuiltin)Force this method to be treated as a core built-in method if true, or as a normal non-core method otherwise. |
| public void | setNotImplemented(boolean
is this not implement or not setNotImplemented)Set whether this method is "not implemented". |
| public void | |
| public void |
| aliasCount | back to summary |
|---|---|
| protected int aliasCount How many times has this method been aliased. | |
| BUILTIN_FLAG | back to summary |
|---|---|
| private static final int BUILTIN_FLAG | |
| definedClass | back to summary |
|---|---|
| protected RubyModule definedClass The module or class that originally defined this method. Referred to as the `defined_class` in C Ruby. | |
| flags | back to summary |
|---|---|
| protected byte flags Flags for builtin, notimpl, etc | |
| handle | back to summary |
|---|---|
| protected Object handle An arbitrarily-typed "method handle" for use by compilers and call sites | |
| implementationClass | back to summary |
|---|---|
| protected RubyModule implementationClass The Ruby module or class from which this method should `super`. Referred to as the `owner` in C Ruby. | |
| name | back to summary |
|---|---|
| protected final String name The simple, base name this method was defined under. May be null. | |
| NOTIMPL_FLAG | back to summary |
|---|---|
| private static final int NOTIMPL_FLAG | |
| protectedClass | back to summary |
|---|---|
| protected RubyModule protectedClass The "protected class" used for calculating protected access. | |
| REFINED_FLAG | back to summary |
|---|---|
| private static final int REFINED_FLAG | |
| serialNumber | back to summary |
|---|---|
| protected long serialNumber The serial number for this method object, to globally identify it | |
| visibility | back to summary |
|---|---|
| private byte visibility The visibility of this method. This is the ordinal of the Visibility enum value. | |
| DynamicMethod | back to summary |
|---|---|
| protected DynamicMethod(RubyModule implementationClass, Visibility visibility, String name) Base constructor for dynamic method handles with names.
| |
| DynamicMethod | back to summary |
|---|---|
| protected DynamicMethod(String name) A no-arg constructor used only by the UndefinedMethod subclass and CompiledMethod handles. instanceof assertions make sure this is so.
| |
| DynamicMethod | back to summary |
|---|---|
| protected DynamicMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig)
Deprecated
| |
| DynamicMethod | back to summary |
|---|---|
| protected DynamicMethod(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig, String name)
Deprecated
| |
| DynamicMethod | back to summary |
|---|---|
| protected DynamicMethod(RubyModule implementationClass, Visibility visibility)
Deprecated Use
| |
| adjustAliasCount | back to summary |
|---|---|
| public void adjustAliasCount(int delta) | |
| calculateProtectedClass | back to summary |
|---|---|
| protected static RubyModule calculateProtectedClass(RubyModule cls) Calculate, based on given RubyModule, which class in its hierarchy should be used to determine protected access.
| |
| call | back to summary |
|---|---|
| public abstract IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) 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.
| |
| call | back to summary |
|---|---|
| public IRubyObject 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 | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, Block block) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, Block block) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) | |
| callRespondTo | back to summary |
|---|---|
| public boolean callRespondTo(ThreadContext context, IRubyObject self, String respondToMethodName, RubyModule klazz, RubySymbol name) | |
| dup | back to summary |
|---|---|
| public abstract 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.
| |
| getAliasCount | back to summary |
|---|---|
| public int getAliasCount() | |
| getArity | back to summary |
|---|---|
| public Arity getArity()
Deprecated
Retrieve the arity of this method, used for reporting arity to Ruby code. This arity may or may not reflect the actual specific or variable arities of the referenced method.
| |
| getCallConfig | back to summary |
|---|---|
| public CallConfiguration getCallConfig()
Deprecated
| |
| getDefinedClass | back to summary |
|---|---|
| public RubyModule getDefinedClass() Get the original owner of this method/
| |
| getHandle | back to summary |
|---|---|
| public Object getHandle() Get the "handle" associated with this DynamicMethod.
| |
| getImplementationClass | back to summary |
|---|---|
| public RubyModule getImplementationClass() Retrieve the class or module on which this method is implemented, used for 'super' logic among others.
| |
| getInstanceVariableNames | back to summary |
|---|---|
| public Collection | |
| getMethodData | back to summary |
|---|---|
| public MethodData getMethodData() Additional metadata about this method.
| |
| getName | back to summary |
|---|---|
| public String getName() Get the base name this method was defined as.
| |
| getProtectedClass | back to summary |
|---|---|
| protected RubyModule getProtectedClass() Retrieve the pre-calculated "protected class" used for access checks.
| |
| getRealMethod | back to summary |
|---|---|
| public 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, ...).
| |
| getSerialNumber | back to summary |
|---|---|
| public long getSerialNumber() Get the global serial number for this method object
| |
| getSignature | back to summary |
|---|---|
| public Signature getSignature() Retrieve the signature of this method.
| |
| getVisibility | back to summary |
|---|---|
| public Visibility getVisibility() Get the visibility of this method.
| |
| init | back to summary |
|---|---|
| protected void init(RubyModule implementationClass, Visibility visibility) | |
| init | back to summary |
|---|---|
| protected void init(RubyModule implementationClass, Visibility visibility, CallConfiguration callConfig)
Deprecated
| |
| isBuiltin | back to summary |
|---|---|
| public boolean isBuiltin() Whether this method is a builtin method, i.e. a method built-in to JRuby and loaded during its core boot process.
| |
| isCallableFrom | back to summary |
|---|---|
| public boolean isCallableFrom(IRubyObject caller, CallType callType) Determine whether this method is callable from the given object using the given call type.
| |
| isImplementedBy | back to summary |
|---|---|
| public boolean isImplementedBy(RubyModule other) | |
| isNative | back to summary |
|---|---|
| public boolean isNative() Returns true if this method is backed by native (i.e. Java) code.
| |
| isNotImplemented | back to summary |
|---|---|
| public boolean isNotImplemented() 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).
| |
| isNull | back to summary |
|---|---|
| public final boolean isNull() 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).
| |
| isRefined | back to summary |
|---|---|
| public boolean isRefined() | |
| isUndefined | back to summary |
|---|---|
| public final boolean isUndefined() 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).
| |
| protectedAccessOk | back to summary |
|---|---|
| private boolean protectedAccessOk(IRubyObject caller) Determine whether the given object can safely invoke protected methods on the class this method is bound to.
| |
| setCallConfig | back to summary |
|---|---|
| public void setCallConfig(CallConfiguration callConfig)
Deprecated
| |
| setDefinedClass | back to summary |
|---|---|
| public void setDefinedClass(RubyModule definedClass) Set the defining class for this method, as when restructuring hierarchy for prepend.
| |
| setHandle | back to summary |
|---|---|
| public void setHandle(Object handle) Set the "handle" associated with this DynamicMethod.
| |
| setImplementationClass | back to summary |
|---|---|
| public void setImplementationClass(RubyModule implClass) Set the class on which this method is implemented, used for 'super' logic, among others.
| |
| setIsBuiltin | back to summary |
|---|---|
| public void setIsBuiltin(boolean isBuiltin) Force this method to be treated as a core built-in method if true, or as a normal non-core method otherwise.
| |
| setNotImplemented | back to summary |
|---|---|
| public void setNotImplemented(boolean setNotImplemented) Set whether this method is "not implemented".
| |
| setRuby2Keywords | back to summary |
|---|---|
| public void 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. | |
| setVisibility | back to summary |
|---|---|
| public void setVisibility(Visibility visibility) Set the visibility of this method.
| |
| Modifier and Type | Field and Description |
|---|---|
| private MethodHandle | |
| private final boolean | |
| private final String | |
| private final Class | |
| private final Class | |
| private final Class | |
| private boolean | |
| private Method | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | NativeCall(Class<T> nativeTarget, String nativeName, Class<T> nativeReturn, Class<T>[] nativeSignature, boolean statik)
|
| public | NativeCall(Class<T> nativeTarget, String nativeName, Class<T> nativeReturn, Class<T>[] nativeSignature, boolean statik, boolean java)
|
| Modifier and Type | Method and Description |
|---|---|
| public MethodHandle | Returns: the reflected method corresponding to this NativeCall, or null if it could not be foundGet the java.lang.reflect.Method for this NativeCall quietly. |
| public Method | Returns: the reflected method corresponding to this NativeCallGet the java.lang.reflect.Method for this NativeCall |
| public Method | Returns: the reflected method corresponding to this NativeCall, or null if it could not be foundGet the java.lang.reflect.Method for this NativeCall quietly. |
| public String | |
| public Class | |
| public Class | |
| public Class | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public String |
| handle | back to summary |
|---|---|
| private MethodHandle handle | |
| java | back to summary |
|---|---|
| private final boolean java | |
| nativeName | back to summary |
|---|---|
| private final String nativeName | |
| nativeReturn | back to summary |
|---|---|
| private final Class<T> nativeReturn | |
| nativeSignature | back to summary |
|---|---|
| private final Class<T>[] nativeSignature | |
| nativeTarget | back to summary |
|---|---|
| private final Class<T> nativeTarget | |
| notFound | back to summary |
|---|---|
| private boolean notFound | |
| reflected | back to summary |
|---|---|
| private Method reflected | |
| statik | back to summary |
|---|---|
| private final boolean statik | |
| NativeCall | back to summary |
|---|---|
| public NativeCall(Class<T> nativeTarget, String nativeName, Class<T> nativeReturn, Class<T>[] nativeSignature, boolean statik) | |
| NativeCall | back to summary |
|---|---|
| public NativeCall(Class<T> nativeTarget, String nativeName, Class<T> nativeReturn, Class<T>[] nativeSignature, boolean statik, boolean java) | |
| getHandleQuiet | back to summary |
|---|---|
| public MethodHandle getHandleQuiet(MethodHandles. Get the java.lang.reflect.Method for this NativeCall quietly. If an error is raised, this method will return null;
| |
| getMethod | back to summary |
|---|---|
| public Method getMethod() Get the java.lang.reflect.Method for this NativeCall
| |
| getMethodQuiet | back to summary |
|---|---|
| public Method getMethodQuiet() Get the java.lang.reflect.Method for this NativeCall quietly. If an error is raised, this method will return null;
| |
| getNativeName | back to summary |
|---|---|
| public String getNativeName() | |
| getNativeReturn | back to summary |
|---|---|
| public Class | |
| getNativeSignature | back to summary |
|---|---|
| public Class | |
| getNativeTarget | back to summary |
|---|---|
| public Class | |
| hasBlock | back to summary |
|---|---|
| public boolean hasBlock() | |
| hasContext | back to summary |
|---|---|
| public boolean hasContext() | |
| isJava | back to summary |
|---|---|
| public boolean isJava() | |
| isStatic | back to summary |
|---|---|
| public boolean isStatic() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| version | back to summary |
|---|---|
| public int version() | |