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

Overrides compiler::CType.base

baseSpecifiedSource

Bool baseSpecified := true

closureSource

ClosureExpr? closure

closuresSource

ClosureExpr[] closures

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

Overrides compiler::CType.isGeneric

isGenericParameterSource

override Bool isGenericParameter()

Overrides compiler::CType.isGenericParameter

isNullableSource

override Bool isNullable()

Overrides compiler::CType.isNullable

isParameterizedSource

override Bool isParameterized()

Overrides compiler::CType.isParameterized

isValueSource

override readonly Bool isValue

Overrides compiler::CType.isValue

makeSource

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

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

Overrides compiler::CType.mixins

nameSource

override readonly Str name

Overrides compiler::CType.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

Overrides compiler::DefNode.ns

podSource

override readonly CPod pod

Overrides compiler::CType.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

Overrides compiler::CType.qname

replaceSlotSource

Void replaceSlot(CSlot oldSlot, CSlot newSlot)

Replace oldSlot with newSlot in my slot tables.

signatureSource

override Str signature()

Overrides compiler::CType.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()

Overrides compiler::CType.slots

Return all the all slots (inherited and defined)

staticFieldDefsSource

FieldDef[] staticFieldDefs()

Get the static FieldDefs declared within this TypeDef.

toListOfSource

override CType toListOf()

Overrides compiler::CType.toListOf

toNullableSource

override CType toNullable()

Overrides compiler::CType.toNullable

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Doc inherited from sys::Obj.toStr

Return a string representation of this object.

unitSource

readonly CompilationUnit unit

walkSource

Void walk(Visitor v, VisitDepth depth)