Interface ValidationMessage
-
- All Known Implementing Classes:
ValidationMessageFactory.AbstractValidationMessage,ValidationMessageFactory.ValidationErrorMessage,ValidationMessageFactory.ValidationWarningMessage
public interface ValidationMessageDate: 12.08.2011
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classValidationMessage.TypeValidation message type enum.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description javax.lang.model.element.AnnotationMirrorgetAnnotationMirror()The annotation the error occurred on.javax.lang.model.element.AnnotationValuegetAnnotationValue()The value of the annotation which caused the error.javax.lang.model.element.ElementgetElement()Returns the element that caused the error.java.lang.StringgetMessage()Returns the error message.default booleanprintMessage(javax.annotation.processing.Messager messager)Prints the message and returnstrueif the message was an error message.ValidationMessage.Typetype()The type of the message.
-
-
-
Method Detail
-
type
ValidationMessage.Type type()
The type of the message.- Returns:
- the type of the message.
-
getElement
javax.lang.model.element.Element getElement()
Returns the element that caused the error.- Returns:
- the element that caused the error.
-
getAnnotationMirror
javax.lang.model.element.AnnotationMirror getAnnotationMirror()
The annotation the error occurred on.- Returns:
- the annotation the error occurred on or
nullif this was not an annotation error
-
getAnnotationValue
javax.lang.model.element.AnnotationValue getAnnotationValue()
The value of the annotation which caused the error.- Returns:
- the value of the annotation or
null
-
getMessage
java.lang.String getMessage()
Returns the error message.- Returns:
- the error message.
-
printMessage
default boolean printMessage(javax.annotation.processing.Messager messager)
Prints the message and returnstrueif the message was an error message.- Parameters:
messager- the messager used to print the message- Returns:
trueif this was an error message otherwisefalse
-
-