FieldDataManager
- Type class
- Package:
com.euonia.reflection - Author: damon(zhaorong@outlook.com)
Constructors¶
FieldDataManager(Class<?> businessObjectType)¶
Parameters:
- businessObjectType (Class<?>): 业务对象类型
Methods¶
getRegisteredProperties(): List<PropertyInfo<?>>¶
Returns: List<PropertyInfo<?>> — 已注册的属性列表
getRegisteredProperty(String propertyName): PropertyInfo<?>¶
Parameters:
- propertyName (String): 属性名称
Returns: PropertyInfo<?> — 已注册的属性
Throws: IllegalArgumentException — 如果属性未注册
getFieldData(String fieldName): FieldData<?>¶
Parameters:
- fieldName (String): 字段名称
Returns: FieldData<?> — 指定字段名称的字段数据,如果不存在则返回 null
getFieldData(PropertyInfo<T> property): FieldData<T>¶
Parameters:
- property (PropertyInfo<T>): 属性信息
Returns: FieldData<T> — 指定属性的字段数据
getOrCreateFieldData(PropertyInfo<T> property): FieldData<T>¶
Parameters:
- property (PropertyInfo<T>): 要检索或创建字段数据的属性
Returns: FieldData<T> — 指定属性的字段数据
setFieldData(PropertyInfo<T> property, T value): void¶
Parameters:
- property (PropertyInfo<T>): 要设置字段数据的属性
- value (T): 要为字段数据设置的值
loadFieldData(PropertyInfo<T> property, T value): FieldData<T>¶
Parameters:
- property (PropertyInfo<T>): 要加载字段数据的属性
- value (T): 要为字段数据设置的值
Returns: FieldData<T> — 已加载的字段数据
removeFieldData(PropertyInfo<?> property): void¶
Parameters:
- property (PropertyInfo<?>): 要移除字段数据的属性
fieldExists(String fieldName): boolean¶
Parameters:
- fieldName (String): 要检查的字段名称
Returns: boolean — 如果指定字段名称的字段数据存在则返回 true,否则返回 false
fieldExists(PropertyInfo<?> property): boolean¶
Parameters:
- property (PropertyInfo<?>): 要检查的属性
Returns: boolean — 如果指定属性的字段数据存在则返回 true,否则返回 false
isBusy(): boolean¶
Returns: boolean — 如果有任何字段数据处于忙碌状态则返回 true,否则返回 false
Static Methods¶
initStaticFields(Class<?> businessObjectType): void¶
Parameters:
- businessObjectType (Class<?>): 要为其初始化静态字段的业务对象类型