Package org.miaixz.bus.mapper.entity
Class EntityField
java.lang.Object
org.miaixz.bus.mapper.entity.EntityField
封装字段和方法,统一调用某些方法
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid先创建field,然后可以通过该方法获取property等属性boolean<T extends Annotation>
TgetAnnotation(Class<T> annotationClass) 获取指定的注解Class<?> 获取javaTypegetName()字段属性名反射获取值inthashCode()booleanisAnnotationPresent(Class<? extends Annotation> annotationClass) 是否有该注解voidsetJavaType(Class<?> javaType) 设置javaType
-
Constructor Details
-
EntityField
构造方法- Parameters:
field- 字段propertyDescriptor- 字段name对应的property
-
-
Method Details
-
copyFromPropertyDescriptor
先创建field,然后可以通过该方法获取property等属性- Parameters:
other- 名称信息
-
isAnnotationPresent
是否有该注解- Parameters:
annotationClass- 注解- Returns:
- the boolean
-
getAnnotation
获取指定的注解- Type Parameters:
T- 对象引用- Parameters:
annotationClass- 注解信息- Returns:
- the annotation
-
getValue
反射获取值- Parameters:
object- 对象- Returns:
- the object
- Throws:
IllegalAccessException- 异常InvocationTargetException- 异常
-
equals
-
hashCode
public int hashCode() -
getJavaType
获取javaType- Returns:
-
setJavaType
设置javaType- Parameters:
javaType-
-
getName
字段属性名- Returns:
-