Class EnumConverterValidator<T extends Enum>

java.lang.Object
com.evolveum.midpoint.ninja.util.EnumConverterValidator<T>
All Implemented Interfaces:
com.beust.jcommander.IParameterValidator, com.beust.jcommander.IStringConverter<T>
Direct Known Subclasses:
InitialObjectsOptions.ReportStyleConverter, RunModeConverterValidator, VerifyAuditOptions.ReportStyleConverter, VerifyOptions.ReportStyleConverter, VerifyOptions.VerificationCategoryConverter

public class EnumConverterValidator<T extends Enum> extends Object implements com.beust.jcommander.IStringConverter<T>, com.beust.jcommander.IParameterValidator
  • Constructor Details

    • EnumConverterValidator

      public EnumConverterValidator(@NotNull @NotNull Class<T> enumClass)
  • Method Details

    • validate

      public void validate(String name, String value) throws com.beust.jcommander.ParameterException
      Specified by:
      validate in interface com.beust.jcommander.IParameterValidator
      Throws:
      com.beust.jcommander.ParameterException
    • convert

      public T convert(String value)
      Specified by:
      convert in interface com.beust.jcommander.IStringConverter<T extends Enum>