Class ConstructorMetaClassSite
java.lang.Object
org.codehaus.groovy.runtime.callsite.AbstractCallSite
org.codehaus.groovy.runtime.callsite.MetaClassSite
org.codehaus.groovy.runtime.callsite.ConstructorMetaClassSite
- All Implemented Interfaces:
CallSite
Call site that invokes a constructor through a
MetaClass when
the receiver is that meta class's class.-
Field Summary
Fields inherited from class org.codehaus.groovy.runtime.callsite.MetaClassSite
metaClassFields inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
array, index, name -
Constructor Summary
ConstructorsConstructorDescriptionConstructorMetaClassSite(CallSite site, MetaClass metaClass) Copies the parent site and the meta class used for construction. -
Method Summary
Modifier and TypeMethodDescriptioncallConstructor(Object receiver, Object[] args) Invokes the meta class constructor whenreceiveris that meta class's class.Methods inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
acceptGetProperty, acceptGroovyObjectGetProperty, call, call, call, call, call, call, 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
-
Constructor Details
-
ConstructorMetaClassSite
Copies the parent site and the meta class used for construction.- Parameters:
site- the site whose name and index are copiedmetaClass- the meta class whose class this site accepts as the receiver
-
-
Method Details
-
callConstructor
Invokes the meta class constructor whenreceiveris that meta class's class. AGroovyRuntimeExceptionis unwrapped. Any other receiver is handled by the default constructor call.- Specified by:
callConstructorin interfaceCallSite- Overrides:
callConstructorin classAbstractCallSite- Parameters:
receiver- the constructor's owner, as supplied by the callerargs- the constructor arguments, in order- Returns:
- the constructed object
- Throws:
Throwable- when construction fails
-