Interface ValueTransformer

All Superinterfaces:
com.google.common.base.Function<Object,Object>, Function<Object,Object>
All Known Implementing Classes:
BaseValueTransformer

public interface ValueTransformer extends com.google.common.base.Function<Object,Object>
Implement this interface if you want to provide your own value transformer to ValueTransformerManager.

You should return CANNOT_HANDLE in apply(Object) when implemented transformer cannot transform given value.

Since:
v1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Object
     
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Object from)
    Transform given object into other representation, that can be used as input for field value generators.

    Methods inherited from interface com.google.common.base.Function

    equals

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Field Details

    • CANNOT_HANDLE

      static final Object CANNOT_HANDLE
  • Method Details

    • apply

      Object apply(@Nullable Object from)
      Transform given object into other representation, that can be used as input for field value generators.
      Specified by:
      apply in interface com.google.common.base.Function<Object,Object>
      Specified by:
      apply in interface Function<Object,Object>
      Parameters:
      from - Source object.
      Returns:
      The resulting object or CANNOT_HANDLE when given value cannot be transformed.