class
compiler::TypeDef
sys::Obj compiler::Node compiler::DefNode compiler::TypeDef : compiler::CType
TypeDef models a type definition for a class, mixin or enum
Slots
- addSlotSource
-
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.
- baseSource
-
override CType? base
Overrides compiler::CType.base
- baseSpecifiedSource
-
Bool baseSpecified := true
- closureSource
-
ClosureExpr? closure
- closuresSource
-
ClosureExpr[] closures
- ctorDefsSource
-
MethodDef[] ctorDefs()
Get the constructor MethodDefs declared within this TypeDef.
- enumDefSource
-
Return EnumDef for specified name or null.
- enumDefsSource
-
EnumDef[] enumDefs
- fieldDefSource
-
Return FieldDef for specified name or null.
- fieldDefsSource
-
FieldDef[] fieldDefs()
Get the FieldDefs declared within this TypeDef.
- hasSlotDefSource
-
Return if this class has a slot definition for specified name.
- indexedFacetsSource
-
FacetDef[]? indexedFacets
- instanceFieldDefsSource
-
FieldDef[] instanceFieldDefs()
Get the instance FieldDefs declared within this TypeDef.
- isClosureSource
-
Bool isClosure()
Return if this type is the anonymous class of a closure
- isGenericSource
-
override Bool isGeneric()
Overrides compiler::CType.isGeneric
- isGenericParameterSource
-
override Bool isGenericParameter()
Overrides compiler::CType.isGenericParameter
- isNullableSource
-
override Bool isNullable()
Overrides compiler::CType.isNullable
- isParameterizedSource
-
override Bool isParameterized()
Overrides compiler::CType.isParameterized
- isValSource
-
override readonly Bool isVal
Overrides compiler::CType.isVal
- makeSource
-
new make(CNamespace ns, Loc loc, CompilationUnit unit, Str name, Int flags := 0)
- methodDefSource
-
MethodDef? methodDef(Str name)
Return MethodDef for specified name or null.
- methodDefsSource
-
MethodDef[] methodDefs()
Get the MethodDefs declared within this TypeDef.
- mixinsSource
-
override CType[] mixins
Overrides compiler::CType.mixins
- nameSource
-
override readonly Str name
Overrides compiler::CType.name
- normalizeStaticInitsSource
-
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)
- nsSource
-
override readonly CNamespace ns
Overrides compiler::DefNode.ns
- podSource
-
override readonly CPod pod
Overrides compiler::CType.pod
- printSource
-
override Void print(AstWriter out)
Overrides compiler::Node.print
Doc inherited from compiler::Node.print
Pretty print this node and it's descendants.
- qnameSource
-
override readonly Str qname
Overrides compiler::CType.qname
- replaceSlotSource
-
Void replaceSlot(CSlot oldSlot, CSlot newSlot)
Replace oldSlot with newSlot in my slot tables.
- signatureSource
-
override Str signature()
Overrides compiler::CType.signature
- slotDefSource
-
Return SlotDef for specified name or null.
-
private SlotDef[] slotDefList
- slotDefsSource
-
SlotDef[] slotDefs()
Get the SlotDefs declared within this TypeDef.
- slotsSource
-
Overrides compiler::CType.slots
Return all the all slots (inherited and defined)
- staticFieldDefsSource
-
FieldDef[] staticFieldDefs()
Get the static FieldDefs declared within this TypeDef.
- staticInitSource
-
MethodDef? staticInit()
Get static initializer if one is defined.
- toListOfSource
-
override CType toListOf()
Overrides compiler::CType.toListOf
- toNullableSource
-
override CType toNullable()
Overrides compiler::CType.toNullable
- unitSource
-
readonly CompilationUnit unit
- walkSource
-
Void walk(Visitor v, VisitDepth depth)