org.codehaus.groovy.runtime.callsite
Class PogoMetaMethodSite

java.lang.Object
  extended by org.codehaus.groovy.runtime.callsite.CallSite
      extended by org.codehaus.groovy.runtime.callsite.MetaClassSite
          extended by org.codehaus.groovy.runtime.callsite.MetaMethodSite
              extended by org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite
Direct Known Subclasses:
PogoMetaMethodSite.PogoCachedMethodSite, PogoMetaMethodSite.PogoMetaMethodSiteNoUnwrap, PogoMetaMethodSite.PogoMetaMethodSiteNoUnwrapNoCoerce

public class PogoMetaMethodSite
extends MetaMethodSite

POGO call site meta class - cached method - cached


Nested Class Summary
static class PogoMetaMethodSite.PogoCachedMethodSite
           
static class PogoMetaMethodSite.PogoCachedMethodSiteNoUnwrap
           
static class PogoMetaMethodSite.PogoCachedMethodSiteNoUnwrapNoCoerce
           
static class PogoMetaMethodSite.PogoMetaMethodSiteNoUnwrap
          Call site where we know there is no need to unwrap arguments
static class PogoMetaMethodSite.PogoMetaMethodSiteNoUnwrapNoCoerce
          Call site where we know there is no need neither unwrap nor coerce arguments
 
Nested classes/interfaces inherited from class org.codehaus.groovy.runtime.callsite.CallSite
CallSite.DummyCallSite
 
Field Summary
 
Fields inherited from class org.codehaus.groovy.runtime.callsite.MetaMethodSite
params, typesChecked, typesValid
 
Fields inherited from class org.codehaus.groovy.runtime.callsite.MetaClassSite
metaClass
 
Fields inherited from class org.codehaus.groovy.runtime.callsite.CallSite
array, index, name, usage
 
Constructor Summary
PogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, MetaMethod metaMethod, Class[] params)
           
 
Method Summary
 CallSite acceptCall(Object receiver, Object[] args)
          Check if receiver/arguments are "exactly the same" as when this site was created.
 CallSite acceptCurrent(Object receiver, Object[] args)
           
 Object call(Object receiver, Object[] args)
           
 Object callCurrent(Object receiver, Object[] args)
           
protected  boolean checkCall(Object receiver, Object[] args)
           
static CallSite createCachedMethodSite(CallSite site, MetaClassImpl metaClass, CachedMethod metaMethod, Class[] params, Object[] args)
           
static CallSite createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, MetaMethod metaMethod, Class[] params, Object[] args)
           
 Object invoke(Object receiver, Object[] args)
          Call method 'name' of receiver with given arguments
 
Methods inherited from class org.codehaus.groovy.runtime.callsite.MetaMethodSite
checkTypes
 
Methods inherited from class org.codehaus.groovy.runtime.callsite.CallSite
acceptBinop, acceptConstructor, acceptCurrentTyped, acceptGetProperty, acceptGroovyObjectGetProperty, acceptStatic, callBinop, callConstructor, callGetProperty, callGetPropertySafe, callGroovyObjectGetProperty, callGroovyObjectGetPropertySafe, callSafe, callStatic, createCallConstructorSite, createCallCurrentSite, createCallSite, createGetPropertySite, createGroovyObjectGetPropertySite, getProperty, invokeBinop, wantProvideCallSite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PogoMetaMethodSite

public PogoMetaMethodSite(CallSite site,
                          MetaClassImpl metaClass,
                          MetaMethod metaMethod,
                          Class[] params)
Method Detail

invoke

public Object invoke(Object receiver,
                     Object[] args)
Description copied from class: CallSite
Call method 'name' of receiver with given arguments

Overrides:
invoke in class CallSite
Parameters:
receiver - receiver
args - arguments
Returns:
result of invocation

acceptCurrent

public final CallSite acceptCurrent(Object receiver,
                                    Object[] args)
Overrides:
acceptCurrent in class CallSite

acceptCall

public final CallSite acceptCall(Object receiver,
                                 Object[] args)
Description copied from class: CallSite
Check if receiver/arguments are "exactly the same" as when this site was created. Exact meaning of "exactly the same" depends on type of the site. For example, for GroovyInterceptable it is enough to check that receiver is GroovyInterceptable but for site with meta method we need to be sure that classes of arguments are exactly the same in the strongest possible meaning.

Overrides:
acceptCall in class CallSite
Parameters:
receiver - receiver
args - arguments
Returns:
if receiver/arguments are valid for this site

callCurrent

public Object callCurrent(Object receiver,
                          Object[] args)
                   throws Throwable
Overrides:
callCurrent in class CallSite
Throws:
Throwable

call

public Object call(Object receiver,
                   Object[] args)
Overrides:
call in class CallSite

checkCall

protected boolean checkCall(Object receiver,
                            Object[] args)

createPogoMetaMethodSite

public static CallSite createPogoMetaMethodSite(CallSite site,
                                                MetaClassImpl metaClass,
                                                MetaMethod metaMethod,
                                                Class[] params,
                                                Object[] args)

createCachedMethodSite

public static CallSite createCachedMethodSite(CallSite site,
                                              MetaClassImpl metaClass,
                                              CachedMethod metaMethod,
                                              Class[] params,
                                              Object[] args)

Copyright © 2003-2008 The Codehaus. All rights reserved.