Class AbstractMethodPropertyAccessStrategy
java.lang.Object
org.axonframework.common.property.PropertyAccessStrategy
org.axonframework.common.property.AbstractMethodPropertyAccessStrategy
- All Implemented Interfaces:
Comparable<PropertyAccessStrategy>
- Direct Known Subclasses:
BeanPropertyAccessStrategy,UniformPropertyAccessStrategy
Abstract implementation of the PropertyAccessStrategy that uses a no-arg, public method to access the property
value. The name of the method can be derived from the name of the property.
- Since:
- 2.0
- Author:
- Maxim Fedorov, Allard Buijze
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringgetterName(String property) Returns the name of the method that is used to access the property.<T> Property<T> propertyFor(Class<? extends T> targetClass, String property) Returns a Property instance for the givenproperty, defined in giventargetClass, ornullif no such property is found on the class.Methods inherited from class org.axonframework.common.property.PropertyAccessStrategy
compareTo, getPriority, getProperty, register, unregister
-
Constructor Details
-
AbstractMethodPropertyAccessStrategy
public AbstractMethodPropertyAccessStrategy()
-
-
Method Details
-
propertyFor
Description copied from class:PropertyAccessStrategyReturns a Property instance for the givenproperty, defined in giventargetClass, ornullif no such property is found on the class.- Specified by:
propertyForin classPropertyAccessStrategy- Type Parameters:
T- The type of class on which to find the property- Parameters:
targetClass- The class on which to find the propertyproperty- The name of the property to find- Returns:
- the Property instance providing access to the property value, or
nullif property could not be found.
-
getterName
Returns the name of the method that is used to access the property.- Parameters:
property- The property to access- Returns:
- the name of the method use as accessor
-