public class PogoMetaMethodSite
extends PlainObjectMetaMethodSite
POGO call site metaclass - cached method - cached
| Modifiers | Name | Description |
|---|---|---|
static class |
PogoMetaMethodSite.PogoCachedMethodSite |
POGO site that invokes a reflected Method. |
static class |
PogoMetaMethodSite.PogoCachedMethodSiteNoUnwrap |
Reflected POGO site that skips MetaClassHelper.unwrap. |
static class |
PogoMetaMethodSite.PogoCachedMethodSiteNoUnwrapNoCoerce |
Reflected POGO site that skips both MetaClassHelper.unwrap and MetaMethod.coerceArgumentsToClasses. |
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 |
| Fields inherited from class | Fields |
|---|---|
class MetaMethodSite |
params |
class MetaClassSite |
metaClass |
class AbstractCallSite |
array, index, name |
| Constructor and description |
|---|
PogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, MetaMethod metaMethod, Class[] params)Caches metaClass, metaMethod, and params,
records metaClass's version, and skips later version checks
when metaClass's class is exactly MetaClassImpl. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
call(Object receiver, Object[] args)When checkCall(Object, Object[]) passes, invoke(Object, Object[]) unwraps args and calls MetaMethod.doMethodInvoke.
|
|
public Object |
callCurrent(GroovyObject receiver, Object[] args)When checkCall(Object, Object[]) passes, invoke(Object, Object[]) unwraps args and calls MetaMethod.doMethodInvoke.
|
|
protected boolean |
checkCall(Object receiver, Object[] args)Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses matches
args. |
|
protected boolean |
checkCall(Object receiver)Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses reports that the
cached parameter list is empty. |
|
protected boolean |
checkCall(Object receiver, Object arg1)Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses matches
arg1. |
|
protected boolean |
checkCall(Object receiver, Object arg1, Object arg2)Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses
matches arg1 and arg2. |
|
protected boolean |
checkCall(Object receiver, Object arg1, Object arg2, Object arg3)Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses
matches arg1, arg2, and arg3. |
|
protected boolean |
checkCall(Object receiver, Object arg1, Object arg2, Object arg3, Object arg4)Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses
matches arg1 through arg4. |
|
public static CallSite |
createCachedMethodSite(CallSite site, MetaClassImpl metaClass, CachedMethod metaMethod, Class[] params, Object[] args)Chooses a CachedMethod POGO site from args.
|
|
public static CallSite |
createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, MetaMethod metaMethod, Class[] params, Object[] args)Returns a POGO site for metaMethod. |
|
public Object |
invoke(Object receiver, Object[] args)Unwraps args with MetaClassHelper.unwrap
and calls MetaMethod.doMethodInvoke, which
coerces them. |
| Methods inherited from class | Name |
|---|---|
class PlainObjectMetaMethodSite |
doInvoke |
class AbstractCallSite |
acceptGetProperty, acceptGroovyObjectGetProperty, call, call, call, call, call, call, callConstructor, callConstructor, callConstructor, callConstructor, callConstructor, callConstructor, callCurrent, callCurrent, callCurrent, callCurrent, callCurrent, callCurrent, callGetProperty, callGetPropertySafe, callGroovyObjectGetProperty, callGroovyObjectGetPropertySafe, callSafe, callSafe, callSafe, callSafe, callSafe, callSafe, callStatic, callStatic, callStatic, callStatic, callStatic, callStatic, createGetPropertySite, createGroovyObjectGetPropertySite, getArray, getIndex, getName, getProperty |
Caches metaClass, metaMethod, and params,
records metaClass's version, and skips later version checks
when metaClass's class is exactly MetaClassImpl.
When checkCall(Object, Object[]) passes, invoke(Object, Object[])
unwraps args and calls MetaMethod.doMethodInvoke.
A GroovyRuntimeException from that call is rethrown via
ScriptBytecodeAdapter.unwrap.
Otherwise falls back to CallSiteArray.defaultCall.
When checkCall(Object, Object[]) passes, invoke(Object, Object[])
unwraps args and calls MetaMethod.doMethodInvoke.
A GroovyRuntimeException from that call is rethrown via
ScriptBytecodeAdapter.unwrap.
Otherwise falls back to
CallSiteArray.defaultCallCurrent.
Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses matches
args. A null receiver or a receiver that is not a
GroovyObject returns false. Any other
NullPointerException or ClassCastException is rethrown.
Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses reports that the
cached parameter list is empty. A null receiver or a receiver
that is not a GroovyObject returns false. Any other
NullPointerException or ClassCastException is rethrown.
Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses matches
arg1. A null receiver or a receiver that is not a
GroovyObject returns false. Any other
NullPointerException or ClassCastException is rethrown.
Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses
matches arg1 and arg2. A null receiver or a
receiver that is not a GroovyObject returns false.
Any other NullPointerException or ClassCastException
is rethrown.
Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses
matches arg1, arg2, and arg3. A null
receiver or a receiver that is not a GroovyObject returns
false. Any other NullPointerException or
ClassCastException is rethrown.
Returns true when the current thread has no Groovy category,
receiver is a GroovyObject whose meta-class is this
site's meta-class, the recorded meta-class version still matches
(skipped when the meta-class's class is exactly MetaClassImpl),
and MetaClassHelper.sameClasses
matches arg1 through arg4. A null receiver or
a receiver that is not a GroovyObject returns false.
Any other NullPointerException or ClassCastException
is rethrown.
Chooses a CachedMethod POGO site from args.
When MetaMethod.correctArguments returns the same
array and noWrappers(args) is true, returns a
PogoCachedMethodSiteNoUnwrap if noCoerce is true,
and otherwise delegates to
CachedMethodCallSites.createPogoMetaMethodSite.
Otherwise returns a PogoCachedMethodSite, whose invoke
unwraps, coerces, and reflects.
Returns a POGO site for metaMethod. When its class is exactly
CachedMethod, delegates to createCachedMethodSite.
Otherwise, when MetaMethod.correctArguments returns
the same array and noWrappers(args) is true, returns a
PogoMetaMethodSiteNoUnwrap if noCoerce is true (its
invoke calls MetaMethod.doMethodInvoke
and skips MetaClassHelper.unwrap) and a
PogoMetaMethodSiteNoUnwrapNoCoerce if noCoerce is false
(its invoke calls MetaMethod.invoke
with no unwrap and no coerce).
If those argument checks fail, returns a PogoMetaMethodSite.
Unwraps args with MetaClassHelper.unwrap
and calls MetaMethod.doMethodInvoke, which
coerces them. A GroovyRuntimeException is rethrown via
ScriptBytecodeAdapter.unwrap.
Performs no receiver, meta-class version, or argument-class check.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.