Class PlainObjectMetaMethodSite
java.lang.Object
org.codehaus.groovy.runtime.callsite.AbstractCallSite
org.codehaus.groovy.runtime.callsite.MetaClassSite
org.codehaus.groovy.runtime.callsite.MetaMethodSite
org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite
- All Implemented Interfaces:
CallSite
- Direct Known Subclasses:
PogoMetaMethodSite,PojoMetaMethodSite
Plain ordinary object call site
metaclass - cached
method - cached
-
Field Summary
Fields inherited from class org.codehaus.groovy.runtime.callsite.MetaMethodSite
paramsFields inherited from class org.codehaus.groovy.runtime.callsite.MetaClassSite
metaClassFields inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
array, index, name -
Constructor Summary
ConstructorsConstructorDescriptionPlainObjectMetaMethodSite(CallSite site, MetaClass metaClass, MetaMethod metaMethod, Class[] params) CachesmetaClass,metaMethod, and the parameter classes. -
Method Summary
Methods inherited from class org.codehaus.groovy.runtime.callsite.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
-
Constructor Details
-
PlainObjectMetaMethodSite
public PlainObjectMetaMethodSite(CallSite site, MetaClass metaClass, MetaMethod metaMethod, Class[] params) CachesmetaClass,metaMethod, and the parameter classes.- Parameters:
site- the site whose name and index are reusedmetaClass- the receiver's meta-classmetaMethod- the cached methodparams- the parameter classes used to match a later call
-
-
Method Details
-
doInvoke
Invokesreflectonreceiverwithargsand normalizes a primitive return throughMetaClassHelperso the boxed value keeps the identity reflection produced. The cause of anInvocationTargetExceptionis rethrown; aGroovyRuntimeExceptioncause goes throughScriptBytecodeAdapter.unwrap(GroovyRuntimeException).- Parameters:
receiver- the objectreflectis invoked onargs- the arguments passed toreflectreflect- the method to invoke- Returns:
- the normalized return value
- Throws:
Throwable
-