public class NullMethod extends DynamicMethod
DynamicMethod.NativeCall| Modifier and Type | Field and Description |
|---|---|
static NullMethod |
INSTANCE |
builtin, callConfig, handle, implementationClass, name, nativeCall, nativeCalls, notImplemented, protectedClass, serialNumber, visibility| Modifier and Type | Method and Description |
|---|---|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule klazz,
String name,
IRubyObject[] args,
Block block)
The one implementation of call, which throws an exception because
NullMethod can't be invoked.
|
DynamicMethod |
dup()
A dummy implementation of dup that just returns the singleton instance.
|
static NullMethod |
getInstance()
Retrieve the singleton instance.
|
boolean |
isCallableFrom(IRubyObject caller,
CallType callType)
NullMethod is always visible because it's only used as a marker to
break method lookup loops.
|
void |
setCallConfig(CallConfiguration callConfig)
Dummy implementation of setCallConfig that does nothing.
|
void |
setImplementationClass(RubyModule implClass)
Dummy override of setImplementationClass that does nothing.
|
void |
setVisibility(Visibility visibility)
Dummy implementation of setVisibility that does nothing.
|
calculateProtectedClass, call, call, call, call, call, call, call, call, call, getArity, getCallConfig, getHandle, getImplementationClass, getMethodData, getName, getNativeCall, getNativeCall, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, init, isBuiltin, isImplementedBy, isNative, isNotImplemented, isNull, isUndefined, setHandle, setIsBuiltin, setName, setNativeCall, setNativeCall, setNativeCall, setNotImplementedpublic static final NullMethod INSTANCE
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name, IRubyObject[] args, Block block)
call in class DynamicMethodcontext - 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 invocationDynamicMethod.callpublic DynamicMethod dup()
dup in class DynamicMethodpublic static NullMethod getInstance()
public void setImplementationClass(RubyModule implClass)
setImplementationClass in class DynamicMethodimplClass - Ignoredpublic void setVisibility(Visibility visibility)
setVisibility in class DynamicMethodvisibility - Ignoredpublic void setCallConfig(CallConfiguration callConfig)
setCallConfig in class DynamicMethodcallConfig - Ignoredpublic boolean isCallableFrom(IRubyObject caller, CallType callType)
isCallableFrom in class DynamicMethodcaller - The calling objectcallType - The type of callCopyright © 2001-2015 JRuby. All Rights Reserved.