Class BeanUtils


  • public class BeanUtils
    extends Object
    Set of Bean utilities.
    • Constructor Detail

      • BeanUtils

        public BeanUtils()
    • Method Detail

      • getTransformer

        public static <T,​K> Function<T,​K> getTransformer​(Class<K> targetClass)
        Returns a function that transforms an object T in an object K.
        Type Parameters:
        T - the Source object type
        K - the target object type
        Parameters:
        targetClass - the destination object class
        Returns:
        a function that copies of the source object into the destination object
        Throws:
        IllegalArgumentException - if any parameter is invalid
      • getTransformer

        public static <T,​K> Function<T,​K> getTransformer​(Transformer beanTransformer,
                                                                     Class<K> targetClass)
        Returns a function that transforms an object T in an object K.
        Type Parameters:
        T - the Source object type
        K - the target object type
        Parameters:
        beanTransformer - the transformer to be used.
        targetClass - the destination object class
        Returns:
        a function that copies of the source object into the destination object
        Throws:
        IllegalArgumentException - if any parameter is invalid
      • getTransformer

        public final Transformer getTransformer()
        Returns a Bean Transformer.
        Returns:
        a Transformer instance.
      • getValidator

        public final Validator getValidator()
        Returns a Bean Validator.
        Returns:
        a Bean Validator instance.
      • getPrimitiveTypeConverter

        public final Converter getPrimitiveTypeConverter()
        Returns a primitive type converter.
        Returns:
        a Converter instance.