public final class UndefinedMethod extends DynamicMethod
DynamicMethod.NativeCall, DynamicMethod.Version
Modifier and Type | Field and Description |
---|---|
static UndefinedMethod |
INSTANCE |
definedClass, flags, handle, implementationClass, name, protectedClass, serialNumber
Modifier and Type | Method and Description |
---|---|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule klazz,
java.lang.String name,
IRubyObject[] args,
Block block)
The one implementation of call, which throws an exception because
UndefinedMethod can't be invoked.
|
DynamicMethod |
dup()
A dummy implementation of dup that just returns the singleton instance.
|
static UndefinedMethod |
getInstance()
Retrieve the singleton instance.
|
boolean |
isCallableFrom(IRubyObject caller,
CallType callType)
UndefinedMethod is always visible because it's only used as a marker for
missing or undef'ed methods.
|
void |
setDefinedClass(RubyModule definedClass)
Set the defining class for this method, as when restructuring hierarchy for prepend.
|
void |
setImplementationClass(RubyModule implClass)
Dummy override of setImplementationClass that does nothing.
|
void |
setIsBuiltin(boolean isBuiltin) |
void |
setNotImplemented(boolean setNotImplemented)
Set whether this method is "not implemented".
|
void |
setVisibility(Visibility visibility)
Dummy implementation of setVisibility that does nothing.
|
calculateProtectedClass, call, call, call, call, call, call, call, call, call, getArity, getCallConfig, getDefinedClass, getHandle, getImplementationClass, getMethodData, getName, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, init, init, isBuiltin, isImplementedBy, isNative, isNotImplemented, isNull, isRefined, isUndefined, setCallConfig, setHandle
public static final UndefinedMethod INSTANCE
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, java.lang.String name, IRubyObject[] args, Block block)
call
in class DynamicMethod
context
- The thread context for the currently executing threadself
- The 'self' or 'receiver' object to use for this callklazz
- The Ruby class against which this method is bindingname
- The incoming name used to invoke this methodargs
- The argument list to this invocationblock
- The block passed to this invocationjava.lang.UnsupportedOperationException
DynamicMethod.call(ThreadContext, IRubyObject, RubyModule, String)
public DynamicMethod dup()
dup
in class DynamicMethod
public static UndefinedMethod getInstance()
public void setImplementationClass(RubyModule implClass)
setImplementationClass
in class DynamicMethod
implClass
- Ignoredpublic void setDefinedClass(RubyModule definedClass)
DynamicMethod
setDefinedClass
in class DynamicMethod
public void setVisibility(Visibility visibility)
setVisibility
in class DynamicMethod
visibility
- Ignoredpublic void setIsBuiltin(boolean isBuiltin)
setIsBuiltin
in class DynamicMethod
public void setNotImplemented(boolean setNotImplemented)
DynamicMethod
setNotImplemented
in class DynamicMethod
public boolean isCallableFrom(IRubyObject caller, CallType callType)
isCallableFrom
in class DynamicMethod
caller
- The calling objectcallType
- The type of callCopyright © 2001-2020 JRuby. All Rights Reserved.