Interface ParamProblems
- All Superinterfaces:
ProblemFactory
-
Method Summary
Modifier and TypeMethodDescriptionapplyingDefault
(String paramName, Object defaultValue) No '' value was provided, using default value of ' ' static Problem
bindingError
(Parameter parameter, Object value, List<Problem> children) Helper method for calling the right binding error method, depending on whether the given value is aConfigString
or not.bindingError
(Parameter parameter, Problem... children) bindingErrorWithLocation
(Parameter parameter, URI location, Problem... children) Alternative to justproblemsFound
that includes the location where the problematic value was definedstatic ParamProblems
get()
A parameter was given, but it was ignored.ignoredWithHints
(Set<String> keys, Set<String> available) A parameter was given, but it was ignored.invalidFor
(Object thing) Use when the parameters for a given object are invalid, e.g.mutuallyExclusive
(String paramA, String paramB) '' and ' ' cannot both be specified at the same time noBindingAvailable
(Class<?> from, Class<?> to) There was no binder available to bindfrom
->to
.noBindingAvailableForParameter
(Parameter parameter, Class<?> from, Class<?> to) As above, but with a parameter for contextstatic Problem
oneOfTheseRequired
(String... paramNames) Convenience wrapper foroneOfTheseRequired(List)
(because Arrays don't render very nicely in error messages).oneOfTheseRequired
(List<String> paramNames) Return this when there are a set of optional parameters, but at least one of them is requiredwrongNumberGiven
(String paramName, String expected, int given)
-
Method Details
-
get
-
bindingError
Helper method for calling the right binding error method, depending on whether the given value is a
ConfigString
or not. -
applyingDefault
No '
' value was provided, using default value of ' ' -
bindingError
-
bindingErrorWithLocation
Alternative to just
problemsFound
that includes the location where the problematic value was defined -
mutuallyExclusive
'
' and ' ' cannot both be specified at the same time -
wrongNumberGiven
-
oneOfTheseRequired
Return this when there are a set of optional parameters, but at least one of them is required
-
oneOfTheseRequired
Convenience wrapper for
oneOfTheseRequired(List)
(because Arrays don't render very nicely in error messages). -
invalidFor
Use when the parameters for a given object are invalid, e.g. produces a message like: here was a problem with the parameters for
-
ignored
A parameter was given, but it was ignored.
-
ignoredWithHints
A parameter was given, but it was ignored.
-
noBindingAvailable
There was no binder available to bind
from
->to
. This is not usually an error a user can do anything about, but this problem is here to i18n the exception -
noBindingAvailableForParameter
As above, but with a parameter for context
-