Class LambdaBeanPropertyMemberAccessor
java.lang.Object
org.optaplanner.core.impl.domain.common.accessor.LambdaBeanPropertyMemberAccessor
- All Implemented Interfaces:
MemberAccessor
A
MemberAccessor
based on a getter and optionally a setter.-
Constructor Summary
ConstructorDescriptionLambdaBeanPropertyMemberAccessor
(Method getterMethod) LambdaBeanPropertyMemberAccessor
(Method getterMethod, boolean getterOnly) -
Method Summary
Modifier and TypeMethodDescriptionexecuteGetter
(Object bean) void
executeSetter
(Object bean, Object value) <T extends Annotation>
TgetAnnotation
(Class<T> annotationClass) As defined inAnnotatedElement.getAnnotation(Class)
.<T extends Annotation>
T[]getDeclaredAnnotationsByType
(Class<T> annotationClass) Class<?>
As defined byMethod.getGenericReturnType()
andField.getGenericType()
.<Fact_,
Result_>
Function<Fact_,Result_> In order to support node sharing in constraint streams, we need to referenceMemberAccessor.executeGetter(Object)
in a way so that the method reference stays the same instance.getName()
Class<?>
getType()
boolean
toString()
-
Constructor Details
-
LambdaBeanPropertyMemberAccessor
-
LambdaBeanPropertyMemberAccessor
-
-
Method Details
-
getDeclaringClass
- Specified by:
getDeclaringClass
in interfaceMemberAccessor
-
getName
- Specified by:
getName
in interfaceMemberAccessor
-
getType
- Specified by:
getType
in interfaceMemberAccessor
-
getGenericType
Description copied from interface:MemberAccessor
As defined byMethod.getGenericReturnType()
andField.getGenericType()
.- Specified by:
getGenericType
in interfaceMemberAccessor
- Returns:
- never null
-
executeGetter
- Specified by:
executeGetter
in interfaceMemberAccessor
-
getGetterFunction
Description copied from interface:MemberAccessor
In order to support node sharing in constraint streams, we need to referenceMemberAccessor.executeGetter(Object)
in a way so that the method reference stays the same instance. This method returns just such a method reference.- Specified by:
getGetterFunction
in interfaceMemberAccessor
- Returns:
- never null, a constant reference to
MemberAccessor.executeGetter(Object)
-
supportSetter
public boolean supportSetter()- Specified by:
supportSetter
in interfaceMemberAccessor
-
executeSetter
- Specified by:
executeSetter
in interfaceMemberAccessor
-
getSpeedNote
- Specified by:
getSpeedNote
in interfaceMemberAccessor
-
getAnnotation
Description copied from interface:MemberAccessor
As defined inAnnotatedElement.getAnnotation(Class)
.- Specified by:
getAnnotation
in interfaceMemberAccessor
-
getDeclaredAnnotationsByType
- Specified by:
getDeclaredAnnotationsByType
in interfaceMemberAccessor
-
toString
-