Class ReflectionBeanPropertyMemberAccessor
- java.lang.Object
-
- org.optaplanner.core.impl.domain.common.accessor.ReflectionBeanPropertyMemberAccessor
-
- All Implemented Interfaces:
MemberAccessor
public final class ReflectionBeanPropertyMemberAccessor extends Object implements MemberAccessor
AMemberAccessor
based 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 Object
executeGetter(Object bean)
void
executeSetter(Object bean, Object value)
<T extends Annotation>
TgetAnnotation(Class<T> annotationClass)
As defined inAnnotatedElement.getAnnotation(Class)
.Class<?>
getDeclaringClass()
Type
getGenericType()
As defined byMethod.getGenericReturnType()
andField.getGenericType()
.String
getName()
String
getSpeedNote()
Class<?>
getType()
boolean
supportSetter()
String
toString()
-
-
-
Method Detail
-
getDeclaringClass
public Class<?> getDeclaringClass()
- Specified by:
getDeclaringClass
in interfaceMemberAccessor
-
getName
public String getName()
- Specified by:
getName
in interfaceMemberAccessor
-
getType
public Class<?> getType()
- Specified by:
getType
in interfaceMemberAccessor
-
getGenericType
public Type getGenericType()
Description copied from interface:MemberAccessor
As defined byMethod.getGenericReturnType()
andField.getGenericType()
.- Specified by:
getGenericType
in interfaceMemberAccessor
- Returns:
- never null
-
executeGetter
public Object executeGetter(Object bean)
- Specified by:
executeGetter
in interfaceMemberAccessor
-
supportSetter
public boolean supportSetter()
- Specified by:
supportSetter
in interfaceMemberAccessor
-
executeSetter
public void executeSetter(Object bean, Object value)
- Specified by:
executeSetter
in interfaceMemberAccessor
-
getSpeedNote
public String getSpeedNote()
- Specified by:
getSpeedNote
in interfaceMemberAccessor
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
Description copied from interface:MemberAccessor
As defined inAnnotatedElement.getAnnotation(Class)
.- Specified by:
getAnnotation
in interfaceMemberAccessor
-
-