Class GetterSetterAccessor

java.lang.Object
com.bc.ceres.binding.accessors.GetterSetterAccessor
All Implemented Interfaces:
PropertyAccessor

public class GetterSetterAccessor extends Object implements PropertyAccessor
ValueAccessor for values stored in a Field of a plain Java object.
Since:
Ceres 0.14
  • Constructor Details

    • GetterSetterAccessor

      public GetterSetterAccessor(Object instance, Method getter, Method setter)
      Constructs a new ClassFieldAccessor.
      Parameters:
      instance - the plain Java object
      getter - the getter method
      setter - the setter method
  • Method Details

    • getValue

      public Object getValue()
      The strategy to get a value.
      Specified by:
      getValue in interface PropertyAccessor
      Returns:
      The value got.
    • setValue

      public void setValue(Object value)
      The strategy to set a value.
      Specified by:
      setValue in interface PropertyAccessor
      Parameters:
      value - The value to be set.