public class JavaBeanAttributeExtractor extends java.lang.Object implements AttributeExtractor
Modifier and Type | Class and Description |
---|---|
private static class |
JavaBeanAttributeExtractor.MethodRef
A cached method lookup.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
beanProperty |
private java.lang.String |
getMethodName |
private java.lang.String |
isMethodName |
private JavaBeanAttributeExtractor.MethodRef |
lastKeyMethod |
private JavaBeanAttributeExtractor.MethodRef |
lastValueMethod |
private static java.lang.Object |
NO_VALUE |
Constructor and Description |
---|
JavaBeanAttributeExtractor(java.lang.String beanProperty)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
attributeFor(Element element,
java.lang.String attributeName)
Extract the attribute value.
|
private JavaBeanAttributeExtractor.MethodRef |
findMethod(java.lang.Object obj) |
private java.lang.Object |
getValue(java.lang.reflect.Method method,
java.lang.Object key) |
private static final java.lang.Object NO_VALUE
private transient volatile JavaBeanAttributeExtractor.MethodRef lastKeyMethod
private transient volatile JavaBeanAttributeExtractor.MethodRef lastValueMethod
private final java.lang.String isMethodName
private final java.lang.String getMethodName
private final java.lang.String beanProperty
public JavaBeanAttributeExtractor(java.lang.String beanProperty)
beanProperty
- the bean property name to extractpublic java.lang.Object attributeFor(Element element, java.lang.String attributeName) throws AttributeExtractorException
attributeFor
in interface AttributeExtractor
element
- the cache element to inspectattributeName
- the name of the requested attributeAttributeExtractorException
- if the attribute cannot be found or extractedprivate JavaBeanAttributeExtractor.MethodRef findMethod(java.lang.Object obj)
private java.lang.Object getValue(java.lang.reflect.Method method, java.lang.Object key)