org.jruby.runtime
Class CallSite

java.lang.Object
  extended by org.jruby.runtime.CallSite
Direct Known Subclasses:
CachingCallSite, SuperCallSite

public abstract class CallSite
extends java.lang.Object

This is the abstract superclass for all call sites in the system.


Field Summary
protected  CallType callType
          The type of call this site makes
 java.lang.String methodName
          The method name this site calls and caches
 
Constructor Summary
CallSite(java.lang.String methodName, CallType callType)
          Construct a new CallSite with the given method name and call type.
 
Method Summary
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self)
          Call the site's method against the target object passing no args.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, Block block)
          Call the site's method against the target object passing no arguments and a non-literal (block pass, &) block.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, double flote)
          Call the site's method against the target object, passing a literal double value.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args)
          Call the site's method against the target object passing arguments.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0)
          Call the site's method against the target object passing one argument.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block)
          Call the site's method against the target object passing one argument and a non-literal (block pass, &) block.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, Block block)
          Call the site's method against the target object passing one argument and a non-literal (block pass, &) block.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1)
          Call the site's method against the target object passing two arguments.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block)
          Call the site's method against the target object passing two arguments and a non-literal (block pass, &) block.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
          Call the site's method against the target object passing two arguments.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg3, Block block)
          Call the site's method against the target object passing three arguments and a non-literal (block pass, &) block.
abstract  IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, long fixnum)
          Call the site's method against the target object, passing a literal long value.
abstract  IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, Block block)
          Call the site's method against the target object passing no arguments and a literal block.
abstract  IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block)
          Call the site's method against the target object passing arguments and a literal block.
abstract  IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, Block block)
          Call the site's method against the target object passing one argument and a literal block.
abstract  IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block)
          Call the site's method against the target object passing two arguments and a literal block.
abstract  IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
          Call the site's method against the target object passing three arguments and a literal block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodName

public final java.lang.String methodName
The method name this site calls and caches


callType

protected final CallType callType
The type of call this site makes

Constructor Detail

CallSite

public CallSite(java.lang.String methodName,
                CallType callType)
Construct a new CallSite with the given method name and call type.

Parameters:
methodName - the method name this site will call and cache
callType - the type of call to perform (normal, functional, etc)
See Also:
CallType
Method Detail

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 long fixnum)
Call the site's method against the target object, passing a literal long value.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
fixnum - the literal long value to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 double flote)
Call the site's method against the target object, passing a literal double value.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
flote - the literal double value to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self)
Call the site's method against the target object passing no args.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject arg0)
Call the site's method against the target object passing one argument.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the argument to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject arg0,
                                 IRubyObject arg1)
Call the site's method against the target object passing two arguments.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the first argument to pass
arg1 - the second argument to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 IRubyObject arg2)
Call the site's method against the target object passing two arguments.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the first argument to pass
arg1 - the second argument to pass
arg2 - the third argument to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject... args)
Call the site's method against the target object passing arguments.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
args - the arguments to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 Block block)
Call the site's method against the target object passing no arguments and a non-literal (block pass, &) block.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
block - the block argument to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject arg0,
                                 Block block)
Call the site's method against the target object passing one argument and a non-literal (block pass, &) block.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the argument to pass
block - the block argument to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 Block block)
Call the site's method against the target object passing two arguments and a non-literal (block pass, &) block.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the first argument to pass
arg1 - the second argument to pass
block - the block argument to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 IRubyObject arg3,
                                 Block block)
Call the site's method against the target object passing three arguments and a non-literal (block pass, &) block.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the first argument to pass
arg1 - the second argument to pass
arg2 - the third argument to pass
block - the block argument to pass
Returns:
the result of the call

call

public abstract IRubyObject call(ThreadContext context,
                                 IRubyObject caller,
                                 IRubyObject self,
                                 IRubyObject[] args,
                                 Block block)
Call the site's method against the target object passing one argument and a non-literal (block pass, &) block.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
args - the arguments to pass
block - the block argument to pass
Returns:
the result of the call

callIter

public abstract IRubyObject callIter(ThreadContext context,
                                     IRubyObject caller,
                                     IRubyObject self,
                                     Block block)
Call the site's method against the target object passing no arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
block - the literal block to pass
Returns:
the result of the call

callIter

public abstract IRubyObject callIter(ThreadContext context,
                                     IRubyObject caller,
                                     IRubyObject self,
                                     IRubyObject arg0,
                                     Block block)
Call the site's method against the target object passing one argument and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the argument to pass
block - the literal block to pass
Returns:
the result of the call

callIter

public abstract IRubyObject callIter(ThreadContext context,
                                     IRubyObject caller,
                                     IRubyObject self,
                                     IRubyObject arg0,
                                     IRubyObject arg1,
                                     Block block)
Call the site's method against the target object passing two arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the first argument to pass
arg1 - the second argument to pass
block - the literal block to pass
Returns:
the result of the call

callIter

public abstract IRubyObject callIter(ThreadContext context,
                                     IRubyObject caller,
                                     IRubyObject self,
                                     IRubyObject arg0,
                                     IRubyObject arg1,
                                     IRubyObject arg2,
                                     Block block)
Call the site's method against the target object passing three arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
arg0 - the first argument to pass
arg1 - the second argument to pass
arg2 - the third argument to pass
block - the literal block to pass
Returns:
the result of the call

callIter

public abstract IRubyObject callIter(ThreadContext context,
                                     IRubyObject caller,
                                     IRubyObject self,
                                     IRubyObject[] args,
                                     Block block)
Call the site's method against the target object passing arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so.

Parameters:
context - the ThreadContext for the current thread
caller - the caller, for visibility checks
self - the target object to call against
args - the arguments to pass
block - the literal block to pass
Returns:
the result of the call


Copyright © 2002-2009 JRuby Team. All Rights Reserved.