
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
- addSlot
-
Void addSlot(CSlot s, Int slotDefIndex := def)
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
-
override CType base
- baseSpecified
-
Bool baseSpecified
- closure
-
ClosureExpr closure
- closures
-
ClosureExpr[] closures
- 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.
- 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
-
override Bool isGeneric()
- isGenericParameter
-
override Bool isGenericParameter()
- isParameterized
-
override Bool isParameterized()
-
private ListType listOf
- make
-
new make(Namespace ns, Location location, CompilationUnit unit, Str name)
- methodDef
-
Return MethodDef for specified name or null.
- methodDefs
-
MethodDef[] methodDefs()
Get the MethodDefs declared within this TypeDef.
- mixins
-
override CType[] mixins
- name
-
override readonly 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
-
override readonly Namespace ns
- pod
-
override readonly CPod pod
- qname
-
override readonly Str qname
- replaceSlot
-
Void replaceSlot(CSlot oldSlot, CSlot newSlot)
Replace oldSlot with newSlot in my slot tables.
- signature
-
override Str signature()
- slotDef
-
Return SlotDef for specified name or null.
-
private SlotDef[] slotDefList
-
private Str:SlotDef slotDefMap
- slotDefs
-
SlotDef[] slotDefs()
Get the SlotDefs declared within this TypeDef.
-
private Str:CSlot slotMap
- slots
-
override Str:CSlot slots()
Return all the all slots (inherited and defined)
- staticFieldDefs
-
FieldDef[] staticFieldDefs()
Get the static FieldDefs declared within this TypeDef.
- toListOf
-
override ListType toListOf()
- toStr
-
override Str toStr()
- unit
-
readonly CompilationUnit unit
- walk
-
Void walk(Visitor v, VisitDepth depth)
More Info
Slots
- addSlot
- base
- baseSpecified
- closure
- closures
- enumDef
- enumDefs
- fieldDef
- fieldDefs
- hasSlotDef
- indexedFacets
- instanceFieldDefs
- isClosure
- isGeneric
- isGenericParameter
- isParameterized
- listOf
- make
- methodDef
- methodDefs
- mixins
- name
- normalizeStaticInits
- ns
- pod
- qname
- replaceSlot
- signature
- slotDef
- slotDefList
- slotDefMap
- slotDefs
- slotMap
- slots
- staticFieldDefs
- toListOf
- toStr
- unit
- walk