org.optaplanner.core.impl.domain.common.accessor

## Class ReflectionMethodMemberAccessor

- java.lang.Object
- - org.optaplanner.core.impl.domain.common.accessor.ReflectionMethodMemberAccessor

- All Implemented Interfaces:
    AnnotatedElement, MemberAccessor

      public final class ReflectionMethodMemberAccessor
      extends Object
      implements MemberAccessor

  A `MemberAccessor` based on a single read `Method`. Do not confuse with `ReflectionBeanPropertyMemberAccessor` which is richer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReflectionMethodMemberAccessor(Method readMethod)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `executeGetter(Object bean)`
    `void` | `executeSetter(Object bean, Object value)`
    `<T extends Annotation> T` | `getAnnotation(Class<T> annotationClass)`
    `Annotation[]` | `getAnnotations()`
    `Annotation[]` | `getDeclaredAnnotations()`
    `Class<?>` | `getDeclaringClass()`
    `Type` | `getGenericType()` As defined by `Method.getGenericReturnType()` and `Field.getGenericType()`.
    `String` | `getName()`
    `String` | `getSpeedNote()`
    `Class<?>` | `getType()`
    `boolean` | `isAnnotationPresent(Class<? extends Annotation> annotationClass)`
    `boolean` | `supportSetter()`
    `String` | `toString()`

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

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

    - ### Methods inherited from interface java.lang.reflect.AnnotatedElement

      `getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType`

- - ### Constructor Detail

    - #### ReflectionMethodMemberAccessor

          public ReflectionMethodMemberAccessor(Method readMethod)

  - ### Method Detail

    - #### getDeclaringClass

          public Class<?> getDeclaringClass()

      Specified by:
        `getDeclaringClass` in interface `MemberAccessor`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `MemberAccessor`

    - #### getType

          public Class<?> getType()

      Specified by:
        `getType` in interface `MemberAccessor`

    - #### getGenericType

          public Type getGenericType()

      Description copied from interface: `MemberAccessor`
      As defined by `Method.getGenericReturnType()` and `Field.getGenericType()`.
      Specified by:
        `getGenericType` in interface `MemberAccessor`
      Returns:
        never null

    - #### executeGetter

          public Object executeGetter(Object bean)

      Specified by:
        `executeGetter` in interface `MemberAccessor`

    - #### getSpeedNote

          public String getSpeedNote()

      Specified by:
        `getSpeedNote` in interface `MemberAccessor`

    - #### supportSetter

          public boolean supportSetter()

      Specified by:
        `supportSetter` in interface `MemberAccessor`

    - #### executeSetter

          public void executeSetter(Object bean,
                                    Object value)

      Specified by:
        `executeSetter` in interface `MemberAccessor`

    - #### isAnnotationPresent

          public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)

      Specified by:
        `isAnnotationPresent` in interface `AnnotatedElement`

    - #### getAnnotation

          public <T extends Annotation> T getAnnotation(Class<T> annotationClass)

      Specified by:
        `getAnnotation` in interface `AnnotatedElement`

    - #### getAnnotations

          public Annotation[] getAnnotations()

      Specified by:
        `getAnnotations` in interface `AnnotatedElement`

    - #### getDeclaredAnnotations

          public Annotation[] getDeclaredAnnotations()

      Specified by:
        `getDeclaredAnnotations` in interface `AnnotatedElement`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.