Class MessagerAdapter
java.lang.Object
org.hibernate.validator.ap.internal.util.MessagerAdapter
Wrapper around
Messager, which adds the ability to format error messages using MessageFormat.- Author:
- Gunnar Morling
-
Constructor Summary
ConstructorsConstructorDescriptionMessagerAdapter(Messager messager, Diagnostic.Kind diagnosticKind) Creates a new MessagerAdapter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the messager used by this adapter.voidreportErrors(Collection<ConstraintCheckIssue> errors) Reports the given errors against the underlyingMessagerusing the specifiedDiagnostic.Kind.voidreportWarnings(Collection<ConstraintCheckIssue> warnings) Reports the given warnings against the underlyingMessagerusing the specifiedDiagnostic.Kind.
-
Constructor Details
-
MessagerAdapter
Creates a new MessagerAdapter.- Parameters:
messager- The underlying messager.diagnosticKind- The kind with which messages shall be reported.
-
-
Method Details
-
getDelegate
Returns the messager used by this adapter.- Returns:
- The underlying messager.
-
reportErrors
Reports the given errors against the underlyingMessagerusing the specifiedDiagnostic.Kind.- Parameters:
errors- A set with errors to report. May be empty but must not be null.
-
reportWarnings
Reports the given warnings against the underlyingMessagerusing the specifiedDiagnostic.Kind.- Parameters:
warnings- A set with errors to report. May be empty but must not be null.
-