Package org.hibernate.validator.engine
Interface HibernateValidatorEnhancedBean
-
@Incubating public interface HibernateValidatorEnhancedBean
Hibernate Validator specific marker interface. Beans implementing this interface would use corresponding$$_hibernateValidator_getFieldValue(String)and$$_hibernateValidator_getGetterValue(String)methods to retrieve bean property values instead of using reflection or any other means.It is important to keep in mind that in case of explicit implementation of this interface access to all possible constrained getters and fields should be provided, for a class implementing the interface and all its super classes as well. Otherwise unexpected
IllegalArgumentExceptioncould be thrown by the Hibernate Validator engine.- Since:
- 6.1
- Author:
- Marko Bekhta
-
-
Field Summary
Fields Modifier and Type Field Description static StringGET_FIELD_VALUE_METHOD_NAMEstatic StringGET_GETTER_VALUE_METHOD_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object$$_hibernateValidator_getFieldValue(String name)Object$$_hibernateValidator_getGetterValue(String name)
-
-
-
Field Detail
-
GET_FIELD_VALUE_METHOD_NAME
static final String GET_FIELD_VALUE_METHOD_NAME
- See Also:
- Constant Field Values
-
GET_GETTER_VALUE_METHOD_NAME
static final String GET_GETTER_VALUE_METHOD_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
$$_hibernateValidator_getFieldValue
Object $$_hibernateValidator_getFieldValue(String name)
- Parameters:
name- the name of a field property of interest.- Returns:
- the value of the field named
nameof the current bean. - Throws:
IllegalArgumentException- in case no field could be found for the given name.
-
$$_hibernateValidator_getGetterValue
Object $$_hibernateValidator_getGetterValue(String name)
- Parameters:
name- the name of a getter of interest.- Returns:
- the value returned by the getter named
nameof the current bean. - Throws:
IllegalArgumentException- in case when no getter property could be found for the given name.
-
-