The idea is to accept Java 8 method references for denoting a property:
{code} validator.validateValue( Address.class, Address::getCity, "Purbeck" ); {code}
A possible way of implementing it is described at http://in.relation.to/2016/04/14/emulating-property-literals-with-java-8-method-references/.
Questions/remarks around it:
* Cannot deal with field only properties and private getters * Will be stale should Java ever introduce real properties * ... |
|