Fan

 

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? base

baseSpecifiedSource

Bool baseSpecified := true

closureSource

ClosureExpr? closure

closuresSource

ClosureExpr[] closures

ctorDefsSource

MethodDef[] ctorDefs()

Get the constructor MethodDefs declared within this TypeDef.

docMetaSource

[Str:Str]? docMeta()

enumDefSource

EnumDef? enumDef(Str name)

Return EnumDef for specified name or null.

enumDefsSource

EnumDef[] enumDefs

fieldDefSource

FieldDef? fieldDef(Str name)

Return FieldDef for specified name or null.

fieldDefsSource

FieldDef[] fieldDefs()

Get the FieldDefs declared within this TypeDef.

hasSlotDefSource

Bool hasSlotDef(Str name)

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()

isGenericParameterSource

override Bool isGenericParameter()

isNullableSource

override Bool isNullable()

isParameterizedSource

override Bool isParameterized()

isValueSource

override readonly Bool isValue

makeSource

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

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[] mixins

nameSource

override readonly Str 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 ns

podSource

override readonly CPod 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 qname

replaceSlotSource

Void replaceSlot(CSlot oldSlot, CSlot newSlot)

Replace oldSlot with newSlot in my slot tables.

signatureSource

override Str signature()

slotDefSource

SlotDef? slotDef(Str name)

Return SlotDef for specified name or null.

slotDefsSource

SlotDef[] slotDefs()

Get the SlotDefs declared within this TypeDef.

slotsSource

override Str:CSlot slots()

Return all the all slots (inherited and defined)

staticFieldDefsSource

FieldDef[] staticFieldDefs()

Get the static FieldDefs declared within this TypeDef.

toListOfSource

override CType toListOf()

toNullableSource

override CType toNullable()

unitSource

readonly CompilationUnit unit

walkSource

Void walk(Visitor v, VisitDepth depth)