Interface ParamProblems

All Superinterfaces:
ProblemFactory

public interface ParamProblems extends ProblemFactory
  • Method Details

    • get

      static ParamProblems get()
    • applyingDefault

      Problem applyingDefault(String paramName, Object defaultValue)

      No '' value was provided, using default value of ''

    • mutuallyExclusive

      Problem mutuallyExclusive(String paramA, String paramB)

      '' and '' cannot both be specified at the same time

    • wrongNumberGiven

      Problem wrongNumberGiven(String paramName, String expected, int given)
    • oneOfTheseRequired

      Problem oneOfTheseRequired(List<String> paramNames)

      Return this when there are a set of optional parameters, but at least one of them is required

    • oneOfTheseRequired

      static Problem oneOfTheseRequired(String... paramNames)

      Convenience wrapper for oneOfTheseRequired(List) (because Arrays don't render very nicely in error messages).

    • invalidFor

      Problem invalidFor(Object thing)

      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

      Problem ignored(String key)

      A parameter was given, but it was ignored.

    • ignoredWithHints

      Problem ignoredWithHints(Set<String> keys, Set<String> available)

      A parameter was given, but it was ignored.

    • noBindingAvailable

      Problem noBindingAvailable(Class<?> from, Class<?> to)

      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

      Problem noBindingAvailableForParameter(Parameter parameter, Class<?> from, Class<?> to)

      As above, but with a parameter for context