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

public abstract class AbstractMethodPropertyAccessStrategy extends PropertyAccessStrategy
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 Details

    • AbstractMethodPropertyAccessStrategy

      public AbstractMethodPropertyAccessStrategy()
  • Method Details

    • propertyFor

      public <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.
    • getterName

      protected abstract String getterName(String property)
      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