Class PogoGetPropertySite
java.lang.Object
org.codehaus.groovy.runtime.callsite.AbstractCallSite
org.codehaus.groovy.runtime.callsite.PogoGetPropertySite
- All Implemented Interfaces:
CallSite
Call site that reads a property from a
GroovyObject whose runtime
class is the class captured when the site was built.-
Field Summary
Fields inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
array, index, name -
Constructor Summary
ConstructorsConstructorDescriptionPogoGetPropertySite(CallSite parent, Class aClass) Copies the parent site and remembers the receiver class it handles. -
Method Summary
Modifier and TypeMethodDescriptionacceptGetProperty(Object receiver) Returns a newly created get-property site whenreceiveris null or its runtime class is not the class captured here.acceptGroovyObjectGetProperty(Object receiver) Returns a site created for a Groovy object property read whenreceiveris null or its runtime class is not the class captured here.getProperty(Object receiver) Reads this site's property name throughGroovyObject.getProperty(String).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
-
PogoGetPropertySite
Copies the parent site and remembers the receiver class it handles.- Parameters:
parent- the site whose name and index are copiedaClass- the runtime class this site accepts
-
-
Method Details
-
acceptGetProperty
Returns a newly created get-property site whenreceiveris null or its runtime class is not the class captured here. Otherwise returns this site.- Overrides:
acceptGetPropertyin classAbstractCallSite
-
acceptGroovyObjectGetProperty
Returns a site created for a Groovy object property read whenreceiveris null or its runtime class is not the class captured here. Otherwise returns this site.- Overrides:
acceptGroovyObjectGetPropertyin classAbstractCallSite
-
getProperty
Reads this site's property name throughGroovyObject.getProperty(String). 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
-