Class ReflectionAttributeExtractor

  • All Implemented Interfaces:
    java.io.Serializable, AttributeExtractor

    public class ReflectionAttributeExtractor
    extends java.lang.Object
    implements AttributeExtractor
    Built-in search attribute extractor driven by method/value dotted expression chains.

    The expression chain must start with one of either "key", "value", or "element". From the starting object a chain of either method calls or field names follows. Method calls and field names can be freely mixed in the chain. Some examples:
    1. "key.getName()" -- call getName() on the key object
    2. "value.person.getAge()" -- get the "person" field of the value object and call getAge() on it
    3. "element.toString()" -- call toString() on the element
    The method and field name portions of the expression are case sensitive
    Author:
    teck
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ReflectionAttributeExtractor​(java.lang.String expression)
      Create a new ReflectionAttributeExtractor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object attributeFor​(Element e, java.lang.String attributeName)
      Evaluate the expression for the given element
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait