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
ConstructorDescriptionMessagerAdapter
(Messager messager, Diagnostic.Kind diagnosticKind) Creates a new MessagerAdapter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the messager used by this adapter.void
reportErrors
(Collection<ConstraintCheckIssue> errors) Reports the given errors against the underlyingMessager
using the specifiedDiagnostic.Kind
.void
reportWarnings
(Collection<ConstraintCheckIssue> warnings) Reports the given warnings against the underlyingMessager
using 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 underlyingMessager
using 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 underlyingMessager
using the specifiedDiagnostic.Kind
.- Parameters:
warnings
- A set with errors to report. May be empty but must not be null.
-