Package org.apache.tapestry5.beanmodel.internal.services

## Class PropertyAccessImpl

- java.lang.Object
- - org.apache.tapestry5.beanmodel.internal.services.PropertyAccessImpl

- All Implemented Interfaces:
    `PropertyAccess`

      public class PropertyAccessImpl
      extends Object
      implements PropertyAccess

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PropertyAccessImpl()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clearCache()` | Clears the cache of adapters and asks the `Introspector` to clear its cache.
    `Object` | `get​(Object instance, String propertyName)` | Reads the value of a property.
    `ClassPropertyAdapter` | `getAdapter​(Class forClass)` | Returns the adapter used to access properties within the indicated class.
    `ClassPropertyAdapter` | `getAdapter​(Object instance)` | Returns the adapter for a particular object instance.
    `Annotation` | `getAnnotation​(Object instance, String propertyName, Class<? extends Annotation> annotationClass)` | Returns the annotation of a given property for the specified type if such an annotation is present, else null.
    `void` | `set​(Object instance, String propertyName, Object value)` | Updates the value of a property.

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

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

- - ### Constructor Detail

    - #### PropertyAccessImpl

          public PropertyAccessImpl()

  - ### Method Detail

    - #### get

          public Object get​(Object instance,
                            String propertyName)

      Description copied from interface: `PropertyAccess`
      Reads the value of a property.
      Specified by:
        `get` in interface `PropertyAccess`

    - #### set

          public void set​(Object instance,
                          String propertyName,
                          Object value)

      Description copied from interface: `PropertyAccess`
      Updates the value of a property.
      Specified by:
        `set` in interface `PropertyAccess`

    - #### getAnnotation

          public Annotation getAnnotation​(Object instance,
                                          String propertyName,
                                          Class<? extends Annotation> annotationClass)

      Description copied from interface: `PropertyAccess`
      Returns the annotation of a given property for the specified type if such an annotation is present, else null. A convenience over invoking `PropertyAccess.getAdapter(Object)`.`ClassPropertyAdapter.getPropertyAdapter(String)`.`AnnotationProvider.getAnnotation(Class)`
      Specified by:
        `getAnnotation` in interface `PropertyAccess`
      Parameters:
        `instance` - the object to read a value from
        `propertyName` - the name of the property to read (case is ignored)
        `annotationClass` - the type of annotation to return

    - #### clearCache

          public void clearCache()

      Clears the cache of adapters and asks the `Introspector` to clear its cache.
      Specified by:
        `clearCache` in interface `PropertyAccess`

    - #### getAdapter

          public ClassPropertyAdapter getAdapter​(Object instance)

      Description copied from interface: `PropertyAccess`
      Returns the adapter for a particular object instance. A convienience over invoking `PropertyAccess.getAdapter(Class)`.
      Specified by:
        `getAdapter` in interface `PropertyAccess`

    - #### getAdapter

          public ClassPropertyAdapter getAdapter​(Class forClass)

      Description copied from interface: `PropertyAccess`
      Returns the adapter used to access properties within the indicated class.
      Specified by:
        `getAdapter` in interface `PropertyAccess`