type

Kind

@Js
abstract const class Kind : Obj

Kind provides a type signature for a Haystack data value

constructors

fromStr

Parse a signature to its Kind representation.

fields

name

Name of kind: Bool, Number, List, etc

type

Fantom type for the kind

methods

equals

Equality is based signature

fromDefName

Lookup Kind from its lower case def name

fromType

Lookup Kind for a Fantom type

fromVal

Lookup Kind for a Fantom object

hash

Hash is based signature

toStr

Return signature

Slot Details

equals

virtual override Bool equals(Obj? that)

Equality is based signature

fromDefName

static Kind? fromDefName(Str name, Bool checked := true)

Lookup Kind from its lower case def name

fromStr

static new fromStr(Str signature, Bool checked := true)

Parse a signature to its Kind representation. If it cannot be parsed to a known kind, then return null or raise an exception.

fromType

static Kind? fromType(Type? type, Bool checked := true)

Lookup Kind for a Fantom type

fromVal

static Kind? fromVal(Obj? val, Bool checked := true)

Lookup Kind for a Fantom object

hash

virtual override Int hash()

Hash is based signature

name

const Str name

Name of kind: Bool, Number, List, etc

toStr

virtual override Str toStr()

Return signature

type

const Type type

Fantom type for the kind