public class ConstructorMetaMethodSite
extends MetaMethodSite
Call site for invoking static methods metaclass - cached method - not cached
| Fields inherited from class | Fields |
|---|---|
class MetaMethodSite |
params |
class MetaClassSite |
metaClass |
class AbstractCallSite |
array, index, name |
| Constructor and description |
|---|
ConstructorMetaMethodSite(CallSite site, MetaClassImpl metaClass, MetaMethod method, Class[] params)Caches method and params, and records metaClass's
version for callConstructor(Object, Object[]). |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public final Object |
callConstructor(Object receiver, Object[] args)When receiver is the meta-class's class, the meta-class version
is unchanged, and MetaClassHelper.sameClasses
matches args to the cached parameter classes, unwraps args
and invokes the cached meta-method on that class. |
|
public final Object |
invoke(Object receiver, Object[] args)Unwraps args and invokes the cached meta-method on the
meta-class's class, ignoring receiver. |
| Methods inherited from class | Name |
|---|---|
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 method and params, and records metaClass's
version for callConstructor(Object, Object[]).
When receiver is the meta-class's class, the meta-class version
is unchanged, and MetaClassHelper.sameClasses
matches args to the cached parameter classes, unwraps args
and invokes the cached meta-method on that class. A
GroovyRuntimeException is rethrown via
ScriptBytecodeAdapter.unwrap.
Otherwise falls back to
CallSiteArray.defaultCallConstructor.
Unwraps args and invokes the cached meta-method on the
meta-class's class, ignoring receiver. A
GroovyRuntimeException is rethrown via
ScriptBytecodeAdapter.unwrap.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.