Package groovy.beans

# Class DefaultPropertyAccessor

java.lang.Object
groovy.beans.DefaultPropertyAccessor

All Implemented Interfaces:
  `PropertyAccessor`, `PropertyReader`, `PropertyWriter`

public class DefaultPropertyAccessor extends Object implements PropertyAccessor
Default `PropertyAccessor` implementation backed by the standard Groovy property reader and writer.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final PropertyAccessor`
  `INSTANCE`
  Shared accessor instance.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultPropertyAccessor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `read(Object owner, String propertyName)`
  Reads the named property from the supplied owner.
  `void`
  `write(Object owner, String propertyName, Object value)`
  Writes the named property on the supplied owner.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### INSTANCE

    public static final PropertyAccessor INSTANCE
    Shared accessor instance.

- ## Constructor Details

  - ### DefaultPropertyAccessor

    public DefaultPropertyAccessor()

- ## Method Details

  - ### read

    public Object read(Object owner, String propertyName)
    Reads the named property from the supplied owner.
    Specified by:
      `read` in interface `PropertyReader`
    Parameters:
      `owner` - the object that owns the property
      `propertyName` - the property name
    Returns:
      the property value

  - ### write

    public void write(Object owner, String propertyName, Object value)
    Writes the named property on the supplied owner.
    Specified by:
      `write` in interface `PropertyWriter`
    Parameters:
      `owner` - the object that owns the property
      `propertyName` - the property name
      `value` - the value to assign