DelegatingDynamicMethod except that it does not delegate most properties of DynamicMethod.
Visibility, etc, set on an instance of PartialDelegatingMethod will not be delegated to the contained method.
This type of method is used primarily for altering the visibility of a parent class's method in a child class.
Note that AliasMethod is not a suitable substitute since it always passes the method's original name to the
delegate, and DelegatingDynamicMethod is not a suitable substitute since it delegates all properties to the
delegate.
| Modifier and Type | Field and Description |
|---|---|
| private final CacheEntry | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | PartialDelegatingMethod(RubyModule implementationClass, CacheEntry entry, Visibility visibility)
Constructor for PartialDelegatingMethod. |
| Modifier and Type | Method and Description |
|---|---|
| private RubyModule | |
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name)
Overrides org.
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg)
Overrides org.
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2)
Overrides org.
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3)
Overrides org.
|
| 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 first argument to this invocation args)Overrides org. 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 | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, Block block)
Overrides org.
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, Block block)
Overrides org.
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, Block block)
Overrides org.
|
| public IRubyObject | call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block)
Overrides org.
|
| 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. The minimum 'call' method required for a dynamic method handle. |
| public DynamicMethod | dup()
Implements abstract org. Duplicate this method, returning DynamicMethod referencing the same code and with the same attributes. |
| public Arity | getArity()
Overrides org.
Deprecated
Retrieve the arity of this method, used for reporting arity to Ruby code. |
| public RubyModule | getDefinedClass()
Overrides org. Get the original owner of this method/ |
| public DynamicMethod | getRealMethod()
Overrides org. Get the "real" method contained within this method. |
| public long | getSerialNumber()
Overrides org. Get the global serial number for this method object |
| public Signature | getSignature()
Overrides org. Retrieve the signature of this method. |
| entry | back to summary |
|---|---|
| private final CacheEntry entry | |
| findImplementer | back to summary |
|---|---|
| private final boolean findImplementer | |
| PartialDelegatingMethod | back to summary |
|---|---|
| public PartialDelegatingMethod(RubyModule implementationClass, CacheEntry entry, Visibility visibility) Constructor for PartialDelegatingMethod. | |
| calculateSourceModule | back to summary |
|---|---|
| private RubyModule calculateSourceModule(IRubyObject self, RubyModule incomingSourceModule) | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args) Overrides org. Doc from org. 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, Block block) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, Block block) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, Block block) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) Overrides org. | |
| call | back to summary |
|---|---|
| public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args, Block block) Implements abstract org. Doc from org. 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.
| |
| dup | back to summary |
|---|---|
| public DynamicMethod dup() Implements abstract org. Doc from org. 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.
| |
| getArity | back to summary |
|---|---|
| public Arity getArity() Overrides org. Doc from org. 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.
| |
| getDefinedClass | back to summary |
|---|---|
| public RubyModule getDefinedClass() Overrides org. Doc from org. Get the original owner of this method/
| |
| getRealMethod | back to summary |
|---|---|
| public DynamicMethod getRealMethod() Overrides org. Doc from org. 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() Overrides org. Doc from org. Get the global serial number for this method object
| |
| getSignature | back to summary |
|---|---|
| public Signature getSignature() Overrides org. Doc from org. Retrieve the signature of this method. | |