public class MetaClassConstructorSite
extends MetaClassSite
Call site for constructor metaclass - cached method - not cached
| Fields inherited from class | Fields |
|---|---|
class MetaClassSite |
metaClass |
class AbstractCallSite |
array, index, name |
| Constructor and description |
|---|
MetaClassConstructorSite(CallSite site, MetaClass metaClass)Caches metaClass and the version of its class so a later
constructor call can tell whether that meta-class is still current. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
callConstructor(Object receiver, Object[] args)Invokes the constructor through the cached meta-class when receiver is that meta-class's class and the version is unchanged.
|
| 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 metaClass and the version of its class so a later
constructor call can tell whether that meta-class is still current.
site - the site whose name and index are reusedmetaClass - the meta-class used to invoke the constructor Invokes the constructor through the cached meta-class when
receiver is that meta-class's class and the version is unchanged.
Otherwise uses the default constructor call.
A GroovyRuntimeException is rethrown via
ScriptBytecodeAdapter.unwrap.
receiver - the class being constructedargs - the constructor argumentsCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.