- java.lang.Object
-
- io.helidon.common.Errors.Collector
-
-
Constructor Summary
Constructors Constructor Description Collector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Errors.Collector
clear()
Clear this instance by discarding allErrors.ErrorMessage
s collected and re-setting status.Errors
collect()
Process the messages collected into anErrors
instance.Errors.Collector
fatal(Object source, String message)
Add a fatal error to the list of messages.Errors.Collector
fatal(String message)
Add a fatal error to the list of messages.boolean
hasFatal()
A helper method to check if this collector already has a fatal message.Errors.Collector
hint(Object source, String message)
Add a hint message to the list of messages.Errors.Collector
hint(String message)
Add a hint message to the list of messages.Errors.Collector
message(Object source, String message, Severity severity)
Add a message to the list of messages.Errors.Collector
message(String message, Severity severity)
Add a message to the list of messages with source automatically added.Errors.Collector
warn(Object source, String message)
Add a warning message to the list of messages.Errors.Collector
warn(String message)
Add a warning message to the list of messages.
-
-
-
Method Detail
-
message
public Errors.Collector message(Object source, String message, Severity severity)
Add a message to the list of messages.- Parameters:
source
- source of the messagemessage
- text message of the messageseverity
- indicates severity of added message- Returns:
- updated collector
-
message
public Errors.Collector message(String message, Severity severity)
Add a message to the list of messages with source automatically added.- Parameters:
message
- text message of the messageseverity
- indicates severity of added message- Returns:
- updated collector
-
fatal
public Errors.Collector fatal(String message)
Add a fatal error to the list of messages.- Parameters:
message
- message of the error- Returns:
- updated collector
-
fatal
public Errors.Collector fatal(Object source, String message)
Add a fatal error to the list of messages.- Parameters:
source
- source of the errormessage
- message of the error- Returns:
- updated collector
-
warn
public Errors.Collector warn(String message)
Add a warning message to the list of messages.- Parameters:
message
- message of the warning- Returns:
- updated collector
-
warn
public Errors.Collector warn(Object source, String message)
Add a warning message to the list of messages.- Parameters:
source
- source of the warningmessage
- message of the warning- Returns:
- updated collector
-
hint
public Errors.Collector hint(String message)
Add a hint message to the list of messages.- Parameters:
message
- message of the hint- Returns:
- updated collector
-
hint
public Errors.Collector hint(Object source, String message)
Add a hint message to the list of messages.- Parameters:
source
- source of the hintmessage
- message of the hint- Returns:
- updated collector
-
collect
public Errors collect()
Process the messages collected into anErrors
instance. Clear this collector (e.g. it can be used to collect new messages).- Returns:
- new
Errors
instance built with messages collected by this collecto
-
clear
public Errors.Collector clear()
Clear this instance by discarding allErrors.ErrorMessage
s collected and re-setting status.- Returns:
- updated collector
-
hasFatal
public boolean hasFatal()
A helper method to check if this collector already has a fatal message.- Returns:
- true if this collector contains at least one fatal message
-
-