public class DefaultValueExtractor extends Object implements ValueExtractor
ComparatorField. A field name can be just the field name (e. g.
firstName), a method name, that is not generated by ValueExtractor.getPossibleMethodNames(String) (e. g. toString) or a path of field names
separated by dots (.), e. g. person.firstName.| Constructor and Description |
|---|
DefaultValueExtractor()
Instantiates a new default value extractor that will throw
ValueExtractorException, if
the given field cannot be found. |
DefaultValueExtractor(boolean throwingException)
Instantiates a new default value extractor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
findValue(Object obj,
String fieldPath)
Find the value of the given add name or path of the given object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindField, findField, findMethod, findMethod, getPossibleMethodNames, invoke, invokepublic DefaultValueExtractor()
ValueExtractorException, if
the given field cannot be found.public DefaultValueExtractor(boolean throwingException)
throwingException - if true and the given field cannot be found, ValueExtractorException will be thrown; otherwise null will
be returnedpublic Object findValue(Object obj, String fieldPath)
ValueExtractorfindValue in interface ValueExtractorobj - the objectfieldPath - the field name or pathCopyright © 2019 bremersee.org. All rights reserved.