All Implemented Interfaces:
ConstraintCheck
Direct Known Subclasses:
AnnotationDefaultMessageCheck, AnnotationUserMessageCheck

public abstract class AnnotationMessageCheck extends AnnotationParametersAbstractCheck
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
  • Constructor Details

    • AnnotationMessageCheck

      public AnnotationMessageCheck(AnnotationApiHelper annotationApiHelper)
  • Method Details

    • canCheckThisAnnotation

      protected boolean canCheckThisAnnotation(AnnotationMirror annotation)
      Description copied from class: AnnotationParametersAbstractCheck
      Verify that this check class can process such annotation.
      Overrides:
      canCheckThisAnnotation in class AnnotationParametersAbstractCheck
      Parameters:
      annotation - annotation you want to process by this class
      Returns:
      true if such annotation can be processed, false otherwise.
    • checkMessage

      protected boolean checkMessage(String message)
      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