pub struct MemberInfo {
pub name: String,
pub kind: MemberKind,
pub span: Span,
pub has_decorator: bool,
pub decorator_names: Vec<String>,
pub is_instance_returning_static: bool,
pub is_self_returning: bool,
}Expand description
A member of an enum, class, or namespace.
Fields§
§name: StringMember name.
kind: MemberKindThe kind of member (enum, class method/property, or namespace member).
span: SpanSource span of the member declaration.
has_decorator: boolWhether this member has decorators (e.g., @Column(), @Inject()).
Decorated members are used by frameworks at runtime and should not be
flagged as unused class members, unless every decorator on the member
is opted out via FallowConfig.ignore_decorators.
decorator_names: Vec<String>Full dotted path of each decorator on this member, in source order.
@step("x") stores "step"; @ns.foo stores "ns.foo". Empty for
undecorated members, Angular signal-initializer properties (which set
has_decorator without a literal decorator AST node), and decorators
whose expression is not an identifier ladder (the entry is the empty
string in that case, treated as never-matching by the predicate).
is_instance_returning_static: boolTrue when this is a static class method that returns a fresh instance
of the same class: either via return new this() / return new <SameClassName>() in the body’s last statement, or via a declared
return type matching the class name. Consumers calling such a static
method receive an instance, so the call result’s member accesses are
credited against the class. See issues #346, #387.
is_self_returning: boolTrue when this is an instance class method whose call result is an
instance of the same class. Qualifies when the declared return type
matches the class name (setX(): EventBuilder { ... }) or when the
body’s last statement is return this. The analyze layer walks fluent
chains (Class.factory().setX().setY()) only through methods carrying
this flag, so the chain stops at a non-self-returning method like
.build(). See issue #387.