In addition to avoiding the need to reparse the dotted fieldPath each time, we also use the FieldPath object as a place to store the previous FieldValueAccessor to which the node's fieldName resolved. Of course, the class for which the previousAccessor applies my not apply for the next usage, but in the common case it does, and so the performance of the dispatch operation is improved by avoiding a more costly hash lookup. Finally, the underlying Accessor (e.g. {@link ReflectionFieldAccessor} or{@link ReflectionMethodAccessor}) may itself cache a byte-code compiled accesor for the target, thereby turning field access into a no-lookup, no-reflection direct access.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|