compiler::TypeDef
sys::Obj
compiler::Node
compiler::DefNode
compiler::TypeDef
Mixin: 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
-
virtual 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.
- 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 Bool isGeneric()
- isGenericParameter
-
virtual Bool isGenericParameter()
- isParameterized
-
virtual 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
-
virtual CType[] mixins
- name
-
virtual Str name { virtual private set }
- 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 Namespace ns { virtual private set }
- pod
-
virtual CPod pod { virtual private set }
- qname
-
virtual Str qname { virtual private set }
- replaceSlot
-
Void replaceSlot(CSlot oldSlot, CSlot newSlot)
Replace oldSlot with newSlot in my slot tables.
- signature
-
virtual 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
-
virtual Str:CSlot slots()
Return all the all slots (inherited and defined)
- staticFieldDefs
-
FieldDef[] staticFieldDefs()
Get the static FieldDefs declared within this TypeDef.
- toListOf
-
virtual ListType toListOf()
- toStr
-
virtual Str toStr()
- unit
-
CompilationUnit unit { private set }
- walk
-
Void walk(Visitor v, VisitDepth depth)
More Info
Slots
- addSlot
- base
- baseSpecified
- closure
- closures
- enumDef
- enumDefs
- fieldDef
- fieldDefs
- hasSlotDef
- 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