FieldInterceptInfo class

字段拦截信息结构体,实现 FConfigFieldInterceptGenerator,用于生成字段相关的拦截代码和模板数据。

该结构体用于描述带有字段拦截注解的字段,便于代码生成器根据注解内容生成自定义的 getter/setter、监听器等代码片段。

Implemented types

Constructors

FieldInterceptInfo(String name, String type, bool typeIsNull, String keyName, String keyType, bool keyTypeIsNull, String? classCode, String? getFieldCode, String? setFieldCode, String? valueUpdateListenerFunCode)
构造函数,初始化所有字段
const
FieldInterceptInfo.create(FieldInfo fieldInfo, FieldElement field, ConstantReader reader)
工厂方法:从字段和注解 ConstantReader 创建 FieldInterceptInfo
factory

Properties

classCode String?
生成的类级代码片段(如 ValueNotifier 声明等)
final
getFieldCode String?
生成的 getter 代码片段(如返回 ValueNotifier)
final
hashCode int
The hash code for this object.
no setterinherited
keyName String
配置项 key 名
final
keyType String
key 对应的类型(通常与字段类型一致)
final
keyTypeIsNull bool
key 类型是否可空
final
name String
字段名
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setFieldCode String?
生成的 setter 代码片段(如赋值并通知变更)
final
type String
字段类型
final
typeIsNull bool
字段是否可空
final
valueUpdateListenerFunCode String?
生成的值变更监听方法代码片段
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toGetCodeMap() → dynamic
转换为 get 方法的 Map,供模板渲染
toInterceptMethodMaps() → dynamic
转换为拦截方法的 Map,供模板渲染
toSetCodeMap() → dynamic
转换为 set 方法的 Map,供模板渲染
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited