logo

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 := 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.

Source

base

override CType base

Source

baseSpecified

Bool baseSpecified := true

Source

closure

ClosureExpr closure

Source

closures

ClosureExpr[] closures

Source

docMeta

Str:Str docMeta()

Source

enumDef

EnumDef enumDef(Str name)

Return EnumDef for specified name or null.

Source

enumDefs

EnumDef[] enumDefs

Source

fieldDef

FieldDef fieldDef(Str name)

Return FieldDef for specified name or null.

Source

fieldDefs

FieldDef[] fieldDefs()

Get the FieldDefs declared within this TypeDef.

Source

hasSlotDef

Bool hasSlotDef(Str name)

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

Source

indexedFacets

FacetDef[] indexedFacets

Source

instanceFieldDefs

FieldDef[] instanceFieldDefs()

Get the instance FieldDefs declared within this TypeDef.

Source

isClosure

Bool isClosure()

Return if this type is the anonymous class of a closure

Source

isGeneric

override Bool isGeneric()

Source

isGenericParameter

override Bool isGenericParameter()

Source

isParameterized

override Bool isParameterized()

Source

make

new make(CNamespace ns, Location location, CompilationUnit unit, Str name)

Source

methodDef

MethodDef methodDef(Str name)

Return MethodDef for specified name or null.

Source

methodDefs

MethodDef[] methodDefs()

Get the MethodDefs declared within this TypeDef.

Source

mixins

override CType[] mixins

Source

name

override readonly Str name

Source

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)

Source

ns

override readonly CNamespace ns

Source

pod

override readonly CPod pod

Source

print

override Void print(AstWriter out)

Pretty print this node and it's descendants.

Source

qname

override readonly Str qname

Source

replaceSlot

Void replaceSlot(CSlot oldSlot, CSlot newSlot)

Replace oldSlot with newSlot in my slot tables.

Source

signature

override Str signature()

Source

slotDef

SlotDef slotDef(Str name)

Return SlotDef for specified name or null.

Source

slotDefs

SlotDef[] slotDefs()

Get the SlotDefs declared within this TypeDef.

Source

slots

override Str:CSlot slots()

Return all the all slots (inherited and defined)

Source

staticFieldDefs

FieldDef[] staticFieldDefs()

Get the static FieldDefs declared within this TypeDef.

Source

toListOf

override ListType toListOf()

Source

toStr

override Str toStr()

Return a string representation of this object.

Source

unit

readonly CompilationUnit unit

Source

walk

Void walk(Visitor v, VisitDepth depth)

Source