Class AnnotationMessageCheck
java.lang.Object
org.hibernate.validator.ap.internal.checks.AbstractConstraintCheck
org.hibernate.validator.ap.internal.checks.annotationparameters.AnnotationParametersAbstractCheck
org.hibernate.validator.ap.internal.checks.annotationparameters.AnnotationMessageCheck
- All Implemented Interfaces:
ConstraintCheck
- Direct Known Subclasses:
AnnotationDefaultMessageCheck,AnnotationUserMessageCheck
A base class to check that the message provided as annotation parameter is valid and gives a warning otherwise.
Two known implementations are
AnnotationUserMessageCheck - checks that message defined by a user is valid,
AnnotationDefaultMessageCheck - checks that default message is valid.- Author:
- Marko Bekhta
-
Field Summary
Fields inherited from class org.hibernate.validator.ap.internal.checks.annotationparameters.AnnotationParametersAbstractCheck
annotationApiHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanCheckThisAnnotation(AnnotationMirror annotation) Verify that this check class can process such annotation.protected booleancheckMessage(String message) Verifies that message passed as parameter is valid (passes a regexp check).Methods inherited from class org.hibernate.validator.ap.internal.checks.annotationparameters.AnnotationParametersAbstractCheck
checkAnnotationType, checkField, checkMethod, checkNonAnnotationType, doCheck
-
Constructor Details
-
AnnotationMessageCheck
-
-
Method Details
-
canCheckThisAnnotation
Description copied from class:AnnotationParametersAbstractCheckVerify that this check class can process such annotation.- Overrides:
canCheckThisAnnotationin classAnnotationParametersAbstractCheck- Parameters:
annotation- annotation you want to process by this class- Returns:
trueif such annotation can be processed,falseotherwise.
-
checkMessage
Verifies that message passed as parameter is valid (passes a regexp check).- Parameters:
message- a message to verify- Returns:
trueif message is valid,falseotherwise
-