Interface ParameterConverters.ParameterConverter<S,​T>

    • Method Summary

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

      • 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()