class compiler::TypeDef

sys::Obj
  compiler::Node
    compiler::DefNode
      compiler::TypeDef : compiler::CType

Source

TypeDef models a type definition for a class, mixin or enum

addSlot

Void addSlot(CSlot s, Int? slotDefIndex := null)

Source

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

Source

baseSpecified

Bool baseSpecified := true

Source

closure

ClosureExpr? closure

Source

closures

ClosureExpr[] closures

Source

ctorDefs

MethodDef[] ctorDefs()

Source

Get the constructor MethodDefs declared within this TypeDef.

enumDef

EnumDef? enumDef(Str name)

Source

Return EnumDef for specified name or null.

enumDefs

EnumDef[] enumDefs

Source

fieldDef

FieldDef? fieldDef(Str name)

Source

Return FieldDef for specified name or null.

fieldDefs

FieldDef[] fieldDefs()

Source

Get the FieldDefs declared within this TypeDef.

hasSlotDef

Bool hasSlotDef(Str name)

Source

Return if this class has a slot definition for specified name.

indexedFacets

FacetDef[]? indexedFacets

Source

instanceFieldDefs

FieldDef[] instanceFieldDefs()

Source

Get the instance FieldDefs declared within this TypeDef.

isClosure

Bool isClosure()

Source

Return if this type is the anonymous class of a closure

isGeneric

virtual override Bool isGeneric()

Source

isGenericParameter

virtual override Bool isGenericParameter()

Source

isNullable

virtual override Bool isNullable()

Source

isParameterized

virtual override Bool isParameterized()

Source

isVal

virtual const override Bool isVal

Source

make

new make(CNamespace ns, Loc loc, CompilationUnit unit, Str name, Int flags := 0)

Source

methodDef

MethodDef? methodDef(Str name)

Source

Return MethodDef for specified name or null.

methodDefs

MethodDef[] methodDefs()

Source

Get the MethodDefs declared within this TypeDef.

mixins

virtual override CType[] mixins

Source

name

virtual const override Str name

Source

normalizeStaticInits

Void normalizeStaticInits(MethodDef m)

Source

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

Source

operators

virtual override COperators operators()

Source

Cached COperators map

pod

virtual override CPod pod

Source

print

virtual override Void print(AstWriter out)

Source

qname

virtual const override Str qname

Source

replaceSlot

Void replaceSlot(CSlot oldSlot, CSlot newSlot)

Source

Replace oldSlot with newSlot in my slot tables.

signature

virtual override Str signature()

Source

slotDef

SlotDef? slotDef(Str name)

Source

Return SlotDef for specified name or null.

slotDefs

SlotDef[] slotDefs()

Source

Get the SlotDefs declared within this TypeDef.

slots

virtual override Str:CSlot slots()

Source

Return all the all slots (inherited and defined)

staticFieldDefs

FieldDef[] staticFieldDefs()

Source

Get the static FieldDefs declared within this TypeDef.

staticInit

MethodDef? staticInit()

Source

Get static initializer if one is defined.

toListOf

virtual override CType toListOf()

Source

toNullable

virtual override CType toNullable()

Source

unit

CompilationUnit unit

Source

walk

Void walk(Visitor v, VisitDepth depth)

Source