Interface ParameterConverters.ParameterConverter<S,T>

Type Parameters:
T - the target converted output
S - the source input value
All Known Implementing Classes:
ParameterConverters.AbstractListParameterConverter, ParameterConverters.AbstractParameterConverter, ParameterConverters.BooleanConverter, ParameterConverters.BooleanListConverter, ParameterConverters.DateConverter, ParameterConverters.EnumConverter, ParameterConverters.EnumListConverter, ParameterConverters.ExamplesTableConverter, ParameterConverters.ExamplesTableParametersConverter, ParameterConverters.FluentEnumConverter, ParameterConverters.FromStringParameterConverter, ParameterConverters.FunctionalParameterConverter, ParameterConverters.JsonConverter, ParameterConverters.MethodReturningConverter, ParameterConverters.NumberConverter, ParameterConverters.NumberListConverter, ParameterConverters.StringConverter, ParameterConverters.StringListConverter
Enclosing class:
ParameterConverters

public static interface ParameterConverters.ParameterConverter<S,T>
A parameter converter for generic type of source input and target output. The converters can be chained to allow for the target of one converter can be used as the source for another.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return true if the converter can convert from the desired target type.
    boolean
    Return true if the converter can convert to the desired target type.
    convertValue(S value, Type type)
    Convert the value from one type to another, for example from a boolean to a String.
     
     
  • Method Details

    • canConvertTo

      boolean canConvertTo(Type type)
      Return true if the converter can convert to the desired target type.
      Parameters:
      type - the type descriptor that describes the requested result type
      Returns:
      true if that conversion can be performed
    • canConvertFrom

      boolean canConvertFrom(Type type)
      Return true if the converter can convert from the desired target type.
      Parameters:
      type - the type descriptor that describes the source type
      Returns:
      true if that conversion can be performed
    • convertValue

      T convertValue(S value, Type type)
      Convert the value from one type to another, for example from a boolean to a String.
      Parameters:
      value - the value to be converted
      type - the type descriptor that supplies extra information about the requested result type
      Returns:
      the converted value
    • getSourceType

      Type getSourceType()
    • getTargetType

      Type getTargetType()