Class FieldMatcher


  • public class FieldMatcher
    extends PathMatcher
    XPath matcher that tests one field of a key. This object is created by a FieldsMatcher when a SelectorMathcer finds a match to its selector. This object is responsible for finding a match to one field of the constraint. A field XPath may consist of "A|B|C". Each sub case A,B, and C is tested by a child FieldPathMatcher object. This class coordinates the work of those children and collects actual text that matches the given XPath.
    Author:
    Kohsuke KAWAGUCHI
    • Field Detail

      • field

        protected Field field
      • value

        protected Object value
        the matched value. If this field is null, then it means nothing is matched yet.
      • parent

        protected final FieldsMatcher parent
        parent FieldsMatcher object.
      • elementText

        protected StringBuffer elementText
        this field is set to non-null if it's found that an element is matched to this XPath. This field is then used to collect the contents of the matched element until it encounters the endElement method.
      • children

        protected Matcher[] children
        child matchers.