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? baseOverrides compiler::CType.base
- baseSpecifiedSource
-
Bool baseSpecified := true - closureSource
-
ClosureExpr? closure - closuresSource
-
ClosureExpr[] closures - ctorDefsSource
-
MethodDef[] ctorDefs()Get the constructor MethodDefs declared within this TypeDef.
- docMetaSource
- 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
- isValueSource
-
override readonly Bool isValueOverrides compiler::CType.isValue
-
private ListType listOf - makeSource
-
new make(CNamespace ns, Location location, CompilationUnit unit, Str name) - 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[] mixinsOverrides compiler::CType.mixins
- nameSource
-
override readonly Str nameOverrides 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 nsOverrides compiler::DefNode.ns
- podSource
-
override readonly CPod podOverrides 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 qnameOverrides 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.
- 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)