Class DirectPropertyAccessStrategy
java.lang.Object
org.axonframework.common.property.PropertyAccessStrategy
org.axonframework.common.property.DirectPropertyAccessStrategy
- All Implemented Interfaces:
Comparable<PropertyAccessStrategy>
Implementation of PropertyAccessStrategy that scans class hierarchy to get public field named "property"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intThe priority of this strategy.protected <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, getProperty, register, unregister
-
Constructor Details
-
DirectPropertyAccessStrategy
public DirectPropertyAccessStrategy()
-
-
Method Details
-
getPriority
protected int getPriority()Description copied from class:PropertyAccessStrategyThe priority of this strategy. In general, implementations that have a higher certainty to provide a good Property instance for any given property name should have a higher priority. When two instances have the same priority, their relative order is undefined. The JavaBean Property strategy has a value of 0. To ensure evaluation before that strategy, use any value higher than that number, otherwise lower.- Specified by:
getPriorityin classPropertyAccessStrategy- Returns:
- a value reflecting relative priority,
Integer.MAX_VALUEbeing evaluated first
-
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.
-