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 boolean
canCheckThisAnnotation
(AnnotationMirror annotation) Verify that this check class can process such annotation.protected boolean
checkMessage
(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:AnnotationParametersAbstractCheck
Verify that this check class can process such annotation.- Overrides:
canCheckThisAnnotation
in classAnnotationParametersAbstractCheck
- Parameters:
annotation
- annotation you want to process by this class- Returns:
true
if such annotation can be processed,false
otherwise.
-
checkMessage
Verifies that message passed as parameter is valid (passes a regexp check).- Parameters:
message
- a message to verify- Returns:
true
if message is valid,false
otherwise
-