org.springframework.data.projection

## Class Accessor

- java.lang.Object
- - org.springframework.data.projection.Accessor

    public final class Accessor
    extends Object

Helper value to abstract an accessor.

Since:
  1.13
Author:
  Oliver Gierke, Christoph Strobl

### Constructor Summary

Constructors
Constructor and Description
`Accessor(Method method)` Creates an `Accessor` for the given `Method`.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getPropertyName()` Returns the name of the property this accessor handles.
`boolean` `isGetter()` Returns whether the accessor is a getter.
`boolean` `isSetter()` Returns whether the accessor is a setter.

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

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

### Constructor Detail

#### Accessor

    public Accessor(Method method)

Creates an `Accessor` for the given `Method`.

Parameters:
  `method` - must not be null.
Throws:
  `IllegalArgumentException` - in case the given method is not an accessor method.

### Method Detail

#### isGetter

    public boolean isGetter()

Returns whether the accessor is a getter.

Returns:

#### isSetter

    public boolean isSetter()

Returns whether the accessor is a setter.

Returns:

#### getPropertyName

    public String getPropertyName()

Returns the name of the property this accessor handles.

Returns:
  will never be null.