类 ReflectUtil

java.lang.Object
cn.hamm.airpower.util.ReflectUtil

public class ReflectUtil extends Object

反射工具类

作者:
Hamm
  • 构造器详细资料

    • ReflectUtil

      public ReflectUtil()
  • 方法详细资料

    • getPostMapping

      public static org.springframework.web.bind.annotation.PostMapping getPostMapping(Method method)
      获取方法的PostMapping
      参数:
      method - 方法
      返回:
      PostMapping
    • getDescription

      public static String getDescription(Class<?> clazz)
      获取描述 Description("用户")
      参数:
      clazz - 类
      返回:
      描述
    • getDescription

      public static String getDescription(Method method)
      获取描述 Description("用户接口")
      参数:
      method - 方法
      返回:
      描述
    • getDescription

      public static String getDescription(Field field)
      获取描述 Description("昵称")
      参数:
      field - 字段
      返回:
      描述
    • isEntity

      public static boolean isEntity(Class<?> clazz)
      是否是继承自BaseEntity
      参数:
      clazz - 类
      返回:
      布尔
    • isModel

      public static boolean isModel(Class<?> clazz)
      是否是继承自BaseModel
      参数:
      clazz - 类
      返回:
      布尔
    • getFieldList

      public static List<Field> getFieldList(Class<?> clazz)
      获取指定类的字段列表
      参数:
      clazz - 类
      返回:
      字段数组
    • getFieldNameList

      public static List<String> getFieldNameList(Class<?> clazz)
      获取类的所有公开属性名称列表
      参数:
      clazz - 类
      返回:
      属性名数组