Class UniformPropertyAccessStrategy

All Implemented Interfaces:
Comparable<PropertyAccessStrategy>

public class UniformPropertyAccessStrategy extends AbstractMethodPropertyAccessStrategy
PropertyAccessStrategy implementation that finds properties defined according to the Uniform Access Principle (see Wikipedia). For example, a property called myProperty, it will use a method called myProperty();
Since:
2.0
Author:
Maxim Fedorov, Allard Buijze
  • Constructor Details

    • UniformPropertyAccessStrategy

      public UniformPropertyAccessStrategy()
  • Method Details

    • getterName

      protected String getterName(String property)
      Description copied from class: AbstractMethodPropertyAccessStrategy
      Returns the name of the method that is used to access the property.
      Specified by:
      getterName in class AbstractMethodPropertyAccessStrategy
      Parameters:
      property - The property to access
      Returns:
      the name of the method use as accessor
    • 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