Top Inners Fields Constructors Methods
org.jruby.runtime.callsite

public Class RespondToCallSite

extends MonomorphicCallSite
Class Inheritance
Imports
org.jruby.RubyBoolean, .RubySymbol, .RubyClass, org.jruby.runtime.Helpers, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.internal.runtime.methods.DynamicMethod, org.jruby.util.TypeConverter

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final String
private RubySymbol
private volatile RespondToCallSite.RespondToTuple

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected IRubyObject
protected IRubyObject
public IRubyObject
call(ThreadContext
the ThreadContext for the current thread
context
,
IRubyObject
the caller, for visibility checks
caller
,
IRubyObject
the target object to call against
self
,
IRubyObject
the argument to pass
name
)

Overrides org.jruby.runtime.callsite.CachingCallSite.call.

Call the site's method against the target object passing one argument.

public IRubyObject
call(ThreadContext
the ThreadContext for the current thread
context
,
IRubyObject
the caller, for visibility checks
caller
,
IRubyObject
the target object to call against
self
,
IRubyObject
the first argument to pass
name
,
IRubyObject
the second argument to pass
bool
)

Overrides org.jruby.runtime.callsite.CachingCallSite.call.

Call the site's method against the target object passing two arguments.

private IRubyObject
fastRespondTo(ThreadContext context, IRubyObject arg, CacheEntry entry, RubyClass selfType, boolean checkVisibility)

private RubySymbol
private static RespondToCallSite.RespondToTuple
recacheRespondsTo(CacheEntry respondToMethod, String newString, RubyClass klass, boolean checkVisibility, ThreadContext context)

public boolean
public boolean
respondsTo(ThreadContext context, IRubyObject caller, IRubyObject self, boolean includePrivate)

Field Detail

respondToNameback to summary
private final String respondToName
respondToNameSymback to summary
private RubySymbol respondToNameSym
respondToTupleback to summary
private volatile RespondToCallSite.RespondToTuple respondToTuple

Constructor Detail

RespondToCallSiteback to summary
public RespondToCallSite()
RespondToCallSiteback to summary
public RespondToCallSite(String name)

Method Detail

cacheAndCallback to summary
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg)

Overrides org.jruby.runtime.callsite.CachingCallSite.cacheAndCall.

Annotations
@Override
cacheAndCallback to summary
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg0, IRubyObject arg1)

Overrides org.jruby.runtime.callsite.CachingCallSite.cacheAndCall.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject name)

Overrides org.jruby.runtime.callsite.CachingCallSite.call.

Doc from org.jruby.runtime.CallSite.call.

Call the site's method against the target object passing one argument.

Parameters
context:ThreadContext

the ThreadContext for the current thread

caller:IRubyObject

the caller, for visibility checks

self:IRubyObject

the target object to call against

name:IRubyObject

the argument to pass

Returns:IRubyObject

the result of the call

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject name, IRubyObject bool)

Overrides org.jruby.runtime.callsite.CachingCallSite.call.

Doc from org.jruby.runtime.CallSite.call.

Call the site's method against the target object passing two arguments.

Parameters
context:ThreadContext

the ThreadContext for the current thread

caller:IRubyObject

the caller, for visibility checks

self:IRubyObject

the target object to call against

name:IRubyObject

the first argument to pass

bool:IRubyObject

the second argument to pass

Returns:IRubyObject

the result of the call

Annotations
@Override
fastRespondToback to summary
private IRubyObject fastRespondTo(ThreadContext context, IRubyObject arg, CacheEntry entry, RubyClass selfType, boolean checkVisibility)
getRespondToNameSymback to summary
private RubySymbol getRespondToNameSym(ThreadContext context)
recacheRespondsToback to summary
private static RespondToCallSite.RespondToTuple recacheRespondsTo(CacheEntry respondToMethod, String newString, RubyClass klass, boolean checkVisibility, ThreadContext context)
respondsToback to summary
public boolean respondsTo(ThreadContext context, IRubyObject caller, IRubyObject self)
respondsToback to summary
public boolean respondsTo(ThreadContext context, IRubyObject caller, IRubyObject self, boolean includePrivate)
org.jruby.runtime.callsite back to summary

private Class RespondToCallSite.RespondToTuple

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final boolean
public final CacheEntry
public final String
pack-priv static final RespondToCallSite.RespondToTuple
public final IRubyObject
public final boolean
public final CacheEntry

Constructor Summary

AccessConstructor and Description
public
RespondToTuple(String name, boolean checkVisibility, CacheEntry respondToMethod, CacheEntry entry, IRubyObject respondsTo)

public
RespondToTuple(String name, boolean checkVisibility, CacheEntry respondToMethod, CacheEntry entry)

Method Summary

Modifier and TypeMethod and Description
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

checkVisibilityback to summary
public final boolean checkVisibility
entryback to summary
public final CacheEntry entry
nameback to summary
public final String name
NULL_CACHEback to summary
pack-priv static final RespondToCallSite.RespondToTuple NULL_CACHE
respondsToback to summary
public final IRubyObject respondsTo
respondsToBooleanback to summary
public final boolean respondsToBoolean
respondToMethodback to summary
public final CacheEntry respondToMethod

Constructor Detail

RespondToTupleback to summary
public RespondToTuple(String name, boolean checkVisibility, CacheEntry respondToMethod, CacheEntry entry, IRubyObject respondsTo)
RespondToTupleback to summary
public RespondToTuple(String name, boolean checkVisibility, CacheEntry respondToMethod, CacheEntry entry)

Method Detail

cacheOkback to summary
public boolean cacheOk(RubyClass klass)