Fantom

 

const final class

sys::Symbol

sys::Obj
  sys::Symbol

Symbol models a qualified name/value pair.

Slots

defValSource

Obj? defVal()

Get the default value of the symbol as originally declared. Use val to get the current value.

docSource

Str? doc()

Return the raw fandoc for this symbol or null if not available. If there is additional documentation meta-data available it is included an the start of the string as a series of "@name=value" lines.

equalsSource

override Bool equals(Obj? that)

Overrides sys::Obj.equals

Two symbols are equal if they have same qname.

findSource

static Symbol? find(Str qname, Bool checked := true)

Find a Symbol by it's qualified name "pod::name". If the symbol doesn't exist and checked is false then return null, otherwise throw UnknownPodErr or UnknownSymbolErr.

hashSource

override Int hash()

Overrides sys::Obj.hash

Hashcode is based on qname.

isVirtualSource

Bool isVirtual()

Return if symbol is virtual which means it may be overridden in a fansym configuration file.

nameSource

Str name()

Get the simple, unqualified name of the symbol.

podSource

Pod pod()

Pod which declared this symbol.

qnameSource

Str qname()

Qualified name of symbol is "{pod.name}::{name}".

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Return "@qname".

typeSource

Type type()

Get the value type of the symbol.

valSource

Obj? val()

Get the current value of the symbol.