Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
BEGIN LICENSE BLOCK ***** Version: EPL 1.0/GPL 2.0/LGPL 2.1 The contents of this file are subject to the Eclipse Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.eclipse.org/legal/epl-v10.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyright (C) 2007 Charles O Nutter <headius@headius.com> Alternatively, the contents of this file may be used under the terms of either of the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the EPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the EPL, the GPL or the LGPL. END LICENSE BLOCK ***
 
 
 package org.jruby.runtime;
 
This is the abstract superclass for all call sites in the system.
 
 public abstract class CallSite {
    
The method name this site calls and caches
 
     public final String methodName;
    
The type of call this site makes
 
     protected final 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
 
     public CallSite(String methodNameCallType callType) {
         this. = methodName;
         this. = callType;
     }
 
     // binary typed calls
     
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
 
     public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selflong fixnum);
    
    
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
 
     public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfdouble flote);
     
     // no block
     
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
 
     public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject self);

    
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
 
     public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0);

    
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
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0IRubyObject 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
arg2 the third argument to pass
Returns:
the result of the call
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0IRubyObject arg1IRubyObject arg2);

    
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
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject... args);

    
Call the site's method against the target object passing arguments. As a "varargs" method, this will use the length of the args array to dispatch to the correct arity call, rather than dispatching unconditionally to the IRubyObject[] path.

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
    public abstract IRubyObject callVarargs(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject... args);
    // with block pass
    
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
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfBlock 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
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0Block 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
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0IRubyObject arg1Block 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
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0IRubyObject arg1IRubyObject arg3Block 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
    public abstract IRubyObject call(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject[] argsBlock block);

    
Call the site's method against the target object passing one argument and a non-literal (block pass, &) block. As a "varargs" method, this will use the length of the args array to dispatch to the correct arity call, rather than dispatching unconditionally to the IRubyObject[] path.

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
    public abstract IRubyObject callVarargs(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject[] argsBlock block);
    // with block literal (iter)
    
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
    public abstract IRubyObject callIter(ThreadContext contextIRubyObject callerIRubyObject selfBlock 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
    public abstract IRubyObject callIter(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0Block 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
    public abstract IRubyObject callIter(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0IRubyObject arg1Block 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
    public abstract IRubyObject callIter(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject arg0IRubyObject arg1IRubyObject arg2Block 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
    public abstract IRubyObject callIter(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject[] argsBlock 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. As a "varargs" method, this will use the length of the args array to dispatch to the correct arity call, rather than dispatching unconditionally to the IRubyObject[] path.

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
    public abstract IRubyObject callVarargsIter(ThreadContext contextIRubyObject callerIRubyObject selfIRubyObject[] argsBlock block);
New to GrepCode? Check out our FAQ X