Class ReflectionBeanPropertyMemberAccessor
- java.lang.Object
-
- org.optaplanner.core.impl.domain.common.accessor.ReflectionBeanPropertyMemberAccessor
-
- All Implemented Interfaces:
AnnotatedElement,MemberAccessor
public final class ReflectionBeanPropertyMemberAccessor extends Object implements MemberAccessor
AMemberAccessorbased on a getter and optionally a setter.
-
-
Constructor Summary
Constructors Constructor Description ReflectionBeanPropertyMemberAccessor(Method getterMethod)ReflectionBeanPropertyMemberAccessor(Method getterMethod, boolean getterOnly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectexecuteGetter(Object bean)voidexecuteSetter(Object bean, Object value)<T extends Annotation>
TgetAnnotation(Class<T> annotationClass)Annotation[]getAnnotations()Annotation[]getDeclaredAnnotations()Class<?>getDeclaringClass()TypegetGenericType()As defined byMethod.getGenericReturnType()andField.getGenericType().StringgetName()StringgetSpeedNote()Class<?>getType()booleanisAnnotationPresent(Class<? extends Annotation> annotationClass)booleansupportSetter()StringtoString()-
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
-
-
-
-
Method Detail
-
getDeclaringClass
public Class<?> getDeclaringClass()
- Specified by:
getDeclaringClassin interfaceMemberAccessor
-
getName
public String getName()
- Specified by:
getNamein interfaceMemberAccessor
-
getType
public Class<?> getType()
- Specified by:
getTypein interfaceMemberAccessor
-
getGenericType
public Type getGenericType()
Description copied from interface:MemberAccessorAs defined byMethod.getGenericReturnType()andField.getGenericType().- Specified by:
getGenericTypein interfaceMemberAccessor- Returns:
- never null
-
executeGetter
public Object executeGetter(Object bean)
- Specified by:
executeGetterin interfaceMemberAccessor
-
supportSetter
public boolean supportSetter()
- Specified by:
supportSetterin interfaceMemberAccessor
-
executeSetter
public void executeSetter(Object bean, Object value)
- Specified by:
executeSetterin interfaceMemberAccessor
-
getSpeedNote
public String getSpeedNote()
- Specified by:
getSpeedNotein interfaceMemberAccessor
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
- Specified by:
isAnnotationPresentin interfaceAnnotatedElement
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
- Specified by:
getAnnotationin interfaceAnnotatedElement
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfaceAnnotatedElement
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement
-
-