Class PojoMetaClassGetPropertySite
java.lang.Object
org.codehaus.groovy.runtime.callsite.AbstractCallSite
org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite
- All Implemented Interfaces:
CallSite
Property-read call site for a plain receiver.
getProperty(Object)
and callGetProperty(Object) both read name through
InvokerHelper. acceptGetProperty(Object) keeps this site.-
Field Summary
Fields inherited from class org.codehaus.groovy.runtime.callsite.AbstractCallSite
array, index, name -
Constructor Summary
ConstructorsConstructorDescriptionPojoMetaClassGetPropertySite(CallSite parent) Copies the call metadata fromparent. -
Method Summary
Modifier and TypeMethodDescriptionfinal CallSiteacceptGetProperty(Object receiver) Accepts any receiver and keeps this site as the property reader.callGetProperty(Object receiver) ReadsnamefromreceiverthroughInvokerHelper.getProperty(Object, String), the same path asgetProperty(Object).final ObjectgetProperty(Object receiver) 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, callGetPropertySafe, callGroovyObjectGetProperty, callGroovyObjectGetPropertySafe, callSafe, callSafe, callSafe, callSafe, callSafe, callSafe, callStatic, callStatic, callStatic, callStatic, callStatic, callStatic, createGetPropertySite, createGroovyObjectGetPropertySite, getArray, getIndex, getName
-
Constructor Details
-
PojoMetaClassGetPropertySite
Copies the call metadata fromparent.- Parameters:
parent- the site whose name and index are reused
-
-
Method Details
-
acceptGetProperty
Accepts any receiver and keeps this site as the property reader.- Overrides:
acceptGetPropertyin classAbstractCallSite- Parameters:
receiver- the property owner, unused- Returns:
- this site
-
getProperty
ReadsnamefromreceiverthroughInvokerHelper.getProperty(Object, String). AGroovyRuntimeExceptionis rethrown viaScriptBytecodeAdapter.unwrap(GroovyRuntimeException).- Specified by:
getPropertyin interfaceCallSite- Overrides:
getPropertyin classAbstractCallSite- Parameters:
receiver- the property owner- Returns:
- the property value
- Throws:
Throwable- when the read fails
-
callGetProperty
ReadsnamefromreceiverthroughInvokerHelper.getProperty(Object, String), the same path asgetProperty(Object). AGroovyRuntimeExceptionis rethrown viaScriptBytecodeAdapter.unwrap(GroovyRuntimeException).- Specified by:
callGetPropertyin interfaceCallSite- Overrides:
callGetPropertyin classAbstractCallSite- Parameters:
receiver- the property owner- Returns:
- the property value
- Throws:
Throwable- when the read fails
-