class compiler::TypeDef
sys::Obj compiler::Node compiler::DefNode compiler::TypeDef : compiler::CType
TypeDef models a type definition for a class, mixin or enum
- addSlot
-
Void addSlot(CSlot s, Int? slotDefIndex := null)Add a slot to the type definition. The method is used to add SlotDefs declared by this type as well as slots inherited by this type.
- base
-
virtual override CType? base - baseSpecified
-
Bool baseSpecified := true - closure
-
ClosureExpr? closure - closures
-
ClosureExpr[] closures - ctorDefs
-
MethodDef[] ctorDefs()Get the constructor MethodDefs declared within this TypeDef.
- enumDef
-
Return EnumDef for specified name or null.
- enumDefs
-
EnumDef[] enumDefs - fieldDef
-
Return FieldDef for specified name or null.
- fieldDefs
-
FieldDef[] fieldDefs()Get the FieldDefs declared within this TypeDef.
- hasItBlockCtor
-
Bool hasItBlockCtor()Does this class have any it block constructors
- hasNativePeer
-
Bool hasNativePeer()Does this class have any native slots (false if entire class is native)
- hasSlotDef
-
Return if this class has a slot definition for specified name.
- indexedFacets
-
FacetDef[]? indexedFacets - instanceFieldDefs
-
FieldDef[] instanceFieldDefs()Get the instance FieldDefs declared within this TypeDef.
- isClosure
-
Bool isClosure()Return if this type is the anonymous class of a closure
- isGeneric
-
virtual override Bool isGeneric() - isGenericParameter
-
virtual override Bool isGenericParameter() - isNullable
-
virtual override Bool isNullable() - isParameterized
-
virtual override Bool isParameterized() - isVal
-
virtual const override Bool isVal - make
-
new make(CNamespace ns, Loc loc, CompilationUnit unit, Str name, Int flags := 0) - methodDef
-
MethodDef? methodDef(Str name)Return MethodDef for specified name or null.
- methodDefs
-
MethodDef[] methodDefs()Get the MethodDefs declared within this TypeDef.
- mixins
-
virtual override CType[] mixins - name
-
virtual const override Str name - normalizeStaticInits
-
Void normalizeStaticInits(MethodDef m)If during parse we added any static initializer methods, now is the time to remove them all and replace them with a single collapsed MethodDef (processed in Normalize step)
- ns
-
virtual override CNamespace ns - operators
-
virtual override COperators operators()Cached COperators map
- pod
-
virtual override CPod pod - podDef
-
PodDef podDef - qname
-
virtual const override Str qname - replaceSlot
-
Void replaceSlot(CSlot oldSlot, CSlot newSlot)Replace oldSlot with newSlot in my slot tables.
- signature
-
virtual override Str signature() - slotDef
-
Return SlotDef for specified name or null.
- slotDefs
-
SlotDef[] slotDefs()Get the SlotDefs declared within this TypeDef.
- slots
-
virtual override Str:CSlot slots()Return all the all slots (inherited and defined)
- staticFieldDefs
-
FieldDef[] staticFieldDefs()Get the static FieldDefs declared within this TypeDef.
- staticInit
-
MethodDef? staticInit()Get static initializer if one is defined.
- toListOf
-
virtual override CType toListOf() - toNullable
-
virtual override CType toNullable() - unit
-
CompilationUnit unit - walk
-
Void walk(Visitor v, VisitDepth depth)