类 BeanUtil


  • public class BeanUtil
    extends Object
    作者:
    youta
    • 构造器详细资料

      • BeanUtil

        public BeanUtil()
    • 方法详细资料

      • copyProperties

        public static <T> T copyProperties​(Object source,
                                           Class<T> tClass)
        source属性为空的不赋值给target
        参数:
        source - 源头
        tClass - 目标类型
        返回:
        T 目标
      • copyProperties

        public static <T> T copyProperties​(Object source,
                                           T target)
        source属性为空的不赋值给target
        参数:
        source - 源头
        target - 目标类型
        返回:
        T 目标
      • getNullPropertyNames

        private static String[] getNullPropertyNames​(Object source)