pub struct ClassDef {Show 26 fields
pub fqcn: Arc<str>,
pub short_name: Arc<str>,
pub parent: Option<Arc<str>>,
pub interfaces: Vec<Arc<str>>,
pub traits: Vec<Arc<str>>,
pub own_methods: MemberMap<Arc<MethodDef>>,
pub own_properties: MemberMap<PropertyDef>,
pub own_constants: MemberMap<ConstantDef>,
pub mixins: Vec<Arc<str>>,
pub template_params: Vec<TemplateParam>,
pub extends_type_args: Vec<Type>,
pub implements_type_args: Vec<(Arc<str>, Vec<Type>)>,
pub trait_use_type_args: Vec<(Arc<str>, Vec<Type>)>,
pub is_abstract: bool,
pub is_final: bool,
pub is_readonly: bool,
pub deprecated: Option<Arc<str>>,
pub is_internal: bool,
pub is_immutable: bool,
pub attribute_flags: Option<i64>,
pub location: Option<Location>,
pub trait_use_locations: Vec<(Arc<str>, Location)>,
pub type_aliases: FxHashMap<Arc<str>, Type>,
pub pending_import_types: Vec<(Arc<str>, Arc<str>, Arc<str>)>,
pub trait_insteadof: MemberMap<Vec<Arc<str>>>,
pub trait_aliases: FxHashMap<Arc<str>, (Option<Arc<str>>, Arc<str>, Option<Visibility>, Arc<str>)>,
}Fields§
§fqcn: Arc<str>§short_name: Arc<str>§parent: Option<Arc<str>>§interfaces: Vec<Arc<str>>§traits: Vec<Arc<str>>§own_methods: MemberMap<Arc<MethodDef>>§own_properties: MemberMap<PropertyDef>§own_constants: MemberMap<ConstantDef>§mixins: Vec<Arc<str>>§template_params: Vec<TemplateParam>§extends_type_args: Vec<Type>Type arguments from @extends ParentClass<T1, T2> — maps parent’s template params to concrete types.
implements_type_args: Vec<(Arc<str>, Vec<Type>)>Type arguments from @implements Interface<T1, T2>.
trait_use_type_args: Vec<(Arc<str>, Vec<Type>)>Type arguments from @use TraitName<T1, T2>, keyed by the used
trait’s FQCN — a class’s use clause (unlike @extends) may name
several traits at once.
is_abstract: bool§is_final: bool§is_readonly: bool§deprecated: Option<Arc<str>>§is_internal: bool§is_immutable: boolSet when the class carries @psalm-immutable — non-constructor methods must not
assign to $this properties.
attribute_flags: Option<i64>Attribute target flags if this class has #[Attribute] annotation.
None = not an attribute class. The value is a bitmask of PHP’s
Attribute::TARGET_* constants (e.g. Attribute::TARGET_CLASS = 1).
location: Option<Location>§trait_use_locations: Vec<(Arc<str>, Location)>Per-use statement locations for each used trait: (fqcn, location) in
declaration order, parallel to traits. Absent from older serialized
slices; defaults to empty.
type_aliases: FxHashMap<Arc<str>, Type>Type aliases declared on this class via @psalm-type / @phpstan-type.
pending_import_types: Vec<(Arc<str>, Arc<str>, Arc<str>)>Raw import-type declarations ((local_name, original_name, from_class)) — resolved during finalization.
trait_insteadof: MemberMap<Vec<Arc<str>>>Trait precedence exclusions from insteadof declarations in this class’s use blocks.
Maps method_name_lowercase → list of trait FQCNs whose version of the method is excluded.
E.g. use A, B { B::hello insteadof A; } stores "hello" → ["A"].
trait_aliases: FxHashMap<Arc<str>, (Option<Arc<str>>, Arc<str>, Option<Visibility>, Arc<str>)>Trait method aliases from as declarations in this class’s use blocks.
Maps new_name_lowercase → (optional_trait_fqcn, original_method_name_lowercase, visibility_override, alias_cased).
alias_cased is the alias name preserving the original PHP casing (for error messages / case checks).
Visibility is None when the as clause only renames without changing visibility.
E.g. use Base { __construct as __constructBase; } stores
"__constructbase" → (None, "__construct", None, "__constructBase").
E.g. use T { foo as private traitFoo; } stores
"traitfoo" → (None, "foo", Some(Private), "traitFoo").