Interface FieldTypeResolver


  • public interface FieldTypeResolver
    Represents a field type resolver.

    A field type resolver is an raw argument resolver, read from the config, and then parsed to a field type.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean shouldResolve​(Class<?> fieldType)
      AnnotationConfig will call this method before calling toType(Object, Field) in order to see if it should proceed processing the value convertion.
      Object toType​(Object value, Field field)
      AnnotationConfig will call this method whenever it is setting a config object's field, if a field type resolver was specified on the field.
    • Method Detail

      • toType

        Object toType​(Object value,
                      Field field)
               throws Exception
        AnnotationConfig will call this method whenever it is setting a config object's field, if a field type resolver was specified on the field.
        Parameters:
        value - config value
        field - field we're resolving
        Returns:
        value with type of the field this resolver was specified on.
        Throws:
        Exception - something wrong occurred
      • shouldResolve

        boolean shouldResolve​(Class<?> fieldType)
        AnnotationConfig will call this method before calling toType(Object, Field) in order to see if it should proceed processing the value convertion.
        Parameters:
        fieldType - field type
        Returns:
        should resolve or not