Class DirectPropertyAccessStrategy

java.lang.Object
org.axonframework.common.property.PropertyAccessStrategy
org.axonframework.common.property.DirectPropertyAccessStrategy
All Implemented Interfaces:
Comparable<PropertyAccessStrategy>

public class DirectPropertyAccessStrategy extends PropertyAccessStrategy
Implementation of PropertyAccessStrategy that scans class hierarchy to get public field named "property"
  • Constructor Details

    • DirectPropertyAccessStrategy

      public DirectPropertyAccessStrategy()
  • Method Details

    • getPriority

      protected int getPriority()
      Description copied from class: PropertyAccessStrategy
      The 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:
      getPriority in class PropertyAccessStrategy
      Returns:
      a value reflecting relative priority, Integer.MAX_VALUE being evaluated first
    • propertyFor

      protected <T> Property<T> propertyFor(Class<? extends T> targetClass, String property)
      Description copied from class: PropertyAccessStrategy
      Returns a Property instance for the given property, defined in given targetClass, or null if no such property is found on the class.
      Specified by:
      propertyFor in class PropertyAccessStrategy
      Type Parameters:
      T - The type of class on which to find the property
      Parameters:
      targetClass - The class on which to find the property
      property - The name of the property to find
      Returns:
      the Property instance providing access to the property value, or null if property could not be found.