Class GetEffectivePojoPropertySite
java.lang.Object
org.codehaus.groovy.runtime.callsite.AbstractCallSite
org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite
- All Implemented Interfaces:
CallSite
Call site that reads a POJO property through a cached
MetaProperty
while the MetaClassImpl version is unchanged and no category is active.-
Field Summary
Fields inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
array, index, name -
Constructor Summary
ConstructorsConstructorDescriptionGetEffectivePojoPropertySite(CallSite site, MetaClassImpl metaClass, MetaProperty effective) Captures the meta class, the property to read, and the meta class version. -
Method Summary
Modifier and TypeMethodDescriptionfinal CallSiteacceptGetProperty(Object receiver) Returns a newly created get-property site whenreceiveris null, its class is not the meta class's class, the meta class version has changed, or a category is active on the current thread.final ObjectgetProperty(Object receiver) Reads the property through the cachedMetaProperty.Methods inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
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
-
Constructor Details
-
GetEffectivePojoPropertySite
Captures the meta class, the property to read, and the meta class version.- Parameters:
site- the site whose name and index are copiedmetaClass- the meta class this site was built fromeffective- the property read when the receiver still matches
-
-
Method Details
-
acceptGetProperty
Returns a newly created get-property site whenreceiveris null, its class is not the meta class's class, the meta class version has changed, or a category is active on the current thread. Otherwise returns this site.- Overrides:
acceptGetPropertyin classAbstractCallSite
-
getProperty
Reads the property through the cachedMetaProperty. AGroovyRuntimeExceptionis unwrapped.- Specified by:
getPropertyin interfaceCallSite- Overrides:
getPropertyin classAbstractCallSite- Parameters:
receiver- the object whose property is read- Returns:
- the property value
- Throws:
Throwable- when the read fails
-