Package cn.lm.mybatis.mapper.entity
Class EntityField
java.lang.Object
cn.lm.mybatis.mapper.entity.EntityField
封装字段和方法,统一调用某些方法
- Author:
- liuzh
-
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:
-
getAnnotation
获取指定的注解- Type Parameters:
T-- Parameters:
annotationClass-- Returns:
-
getValue
反射获取值- Parameters:
object-- Returns:
- Throws:
IllegalAccessExceptionInvocationTargetException
-
equals
-
hashCode
public int hashCode() -
getJavaType
获取javaType- Returns:
-
setJavaType
设置javaType- Parameters:
javaType-
-
getName
字段属性名- Returns:
-