Class PogoMetaClassGetPropertySite
java.lang.Object
org.codehaus.groovy.runtime.callsite.AbstractCallSite
org.codehaus.groovy.runtime.callsite.PogoMetaClassGetPropertySite
- All Implemented Interfaces:
CallSite
Call site that reads a property through a
GroovyObject's
MetaClass while that meta class is still the one captured here.-
Field Summary
Fields inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
array, index, name -
Constructor Summary
ConstructorsConstructorDescriptionPogoMetaClassGetPropertySite(CallSite parent, MetaClass metaClass) Copies the parent site and remembers the meta class used for property reads. -
Method Summary
Modifier and TypeMethodDescriptionfinal CallSiteacceptGetProperty(Object receiver) Returns a newly created get-property site whenreceiveris not aGroovyObjector its meta class is not the one captured here.final CallSiteacceptGroovyObjectGetProperty(Object receiver) Returns a newly created Groovy-object get-property site whenreceiveris not aGroovyObjector its meta class is not the one captured here.final ObjectgetProperty(Object receiver) Reads this site's property through the captured meta class.Methods inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
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
-
PogoMetaClassGetPropertySite
Copies the parent site and remembers the meta class used for property reads.- Parameters:
parent- the site whose name and index are copiedmetaClass- the meta class this site accepts
-
-
Method Details
-
acceptGetProperty
Returns a newly created get-property site whenreceiveris not aGroovyObjector its meta class is not the one captured here. Otherwise returns this site.- Overrides:
acceptGetPropertyin classAbstractCallSite
-
acceptGroovyObjectGetProperty
Returns a newly created Groovy-object get-property site whenreceiveris not aGroovyObjector its meta class is not the one captured here. Otherwise returns this site.- Overrides:
acceptGroovyObjectGetPropertyin classAbstractCallSite
-
getProperty
Reads this site's property through the captured meta class. 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
-