org.codehaus.groovy.runtime.callsite
Class PogoMetaMethodSite
java.lang.Object
org.codehaus.groovy.runtime.callsite.CallSite
org.codehaus.groovy.runtime.callsite.MetaClassSite
org.codehaus.groovy.runtime.callsite.MetaMethodSite
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
|
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.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 |
PogoMetaMethodSite
public PogoMetaMethodSite(CallSite site,
MetaClassImpl metaClass,
MetaMethod metaMethod,
Class[] params)
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 - receiverargs - 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 - receiverargs - 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)