Interface TargetedAccessor
- All Known Subinterfaces:
CompilableIndexAccessor
,CompilablePropertyAccessor
,IndexAccessor
,PropertyAccessor
- All Known Implementing Classes:
BeanExpressionContextAccessor
,BeanFactoryAccessor
,DataBindingPropertyAccessor
,EnvironmentAccessor
,MapAccessor
,ReflectiveIndexAccessor
,ReflectivePropertyAccessor
This interface places no restrictions on what constitutes an element.
A targeted accessor can specify a set of target classes for which it should
be called. However, if it returns null
or an empty array from
getSpecificTargetClasses()
, it will typically be called for all
access operations and given a chance to determine if it supports a concrete
access attempt.
Targeted accessors are considered to be ordered, and each will be called
in turn. The only rule that affects the call order is that any accessor which
specifies explicit support for a given target type via
getSpecificTargetClasses()
will be called first, before other generic
accessors that do not specify support for explicit target types. In addition,
accessors that support the exact target type will be called before accessors
that support a supertype of the target type.
- Since:
- 6.2
- Author:
- Sam Brannen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>[]
Get the set of classes for which this accessor should be called.
-
Method Details
-
getSpecificTargetClasses
Get the set of classes for which this accessor should be called.Returning
null
or an empty array indicates this is a generic accessor that can be called in an attempt to access an element on any type.- Returns:
- an array of classes that this accessor is suitable for
(or
null
or an empty array if a generic accessor)
-