public static class ConstructorSite.NoParamSite
extends ConstructorSite.ConstructorSiteNoUnwrapNoCoerce
Constructor site that, after the inherited checkCall(Object, Object[])
passes, invokes the cached constructor with an empty argument array
and then applies args[0] as a property map. The constructor
call itself neither unwraps nor coerces. Otherwise it falls back to
the default constructor call.
| Fields inherited from class | Fields |
|---|---|
class MetaClassSite |
metaClass |
class AbstractCallSite |
array, index, name |
| Constructor and description |
|---|
NoParamSite(CallSite site, MetaClassImpl metaClass, CachedConstructor constructor, Class[] params)Delegates to ConstructorSiteNoUnwrapNoCoerce, recording the same meta-class version. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public final Object |
callConstructor(Object receiver, Object[] args)When checkCall(Object, Object[]) passes, calls CachedConstructor.invoke with an empty argument array, then casts args[0] to Map and passes it to
MetaClassImpl.setProperties. |
Delegates to ConstructorSiteNoUnwrapNoCoerce, recording the same meta-class version.
When checkCall(Object, Object[]) passes, calls
CachedConstructor.invoke with an empty argument
array, then casts args[0] to Map and passes it to
MetaClassImpl.setProperties. That constructor
call neither unwraps nor coerces. A GroovyRuntimeException
from setting properties is rethrown via
ScriptBytecodeAdapter.unwrap.
Otherwise falls back to
CallSiteArray.defaultCallConstructor.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.