-
public interface ProblemPrinterBuilderA builder interface for building a problem printer instance.- Author:
- leadpony
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProblemHandlerbuild()Builds a new instance of problem printer which was configured through this interface.ProblemPrinterBuilderwithLocale(Locale locale)Specifies the target locale for which the messages to present will be localized.ProblemPrinterBuilderwithLocation(boolean present)Specifies whether problem locations should be presented in the form of line and column numbers or not.ProblemPrinterBuilderwithPointer(boolean present)Specifies whether problem locations should be presented in the form of a JSON pointer or not.
-
-
-
Method Detail
-
build
ProblemHandler build()
Builds a new instance of problem printer which was configured through this interface.- Returns:
- newly created instance of problem printer as a
ProblemHandler, never benull.
-
withLocale
ProblemPrinterBuilder withLocale(Locale locale)
Specifies the target locale for which the messages to present will be localized.The default locale obtained via
Locale.getDefault()is used by default.- Parameters:
locale- the target locale for which the messages will be localized.- Returns:
- this builder.
- Throws:
NullPointerException- if the specifiedlocaleisnull.
-
withLocation
ProblemPrinterBuilder withLocation(boolean present)
Specifies whether problem locations should be presented in the form of line and column numbers or not.The value of this option is set to
trueby default.- Parameters:
present-trueif the locations should be presented,falseif the locations should be omitted.- Returns:
- this builder.
-
withPointer
ProblemPrinterBuilder withPointer(boolean present)
Specifies whether problem locations should be presented in the form of a JSON pointer or not.The value of this option is set to
trueby default.- Parameters:
present-trueif the pointers should be presented,falseif the pointers should be omitted.- Returns:
- this builder.
-
-