type
Spec
Xeto data specification.
Spec dict representation:
- id: Ref "lib:{qname}"
- spec: Ref "sys::Spec"
- base: Ref to base type (types only)
- type: Ref to slot type (slots only)
- effective meta
methods
_id |
Identifier for a spec is always its qualified name This is a temp shim until we move |
---|---|
base |
Base spec from which this spec directly inherits its meta and slots. |
enum |
Return enum item meta. |
isEnum |
Is the base |
isMaybe |
Does meta have maybe tag |
isa |
Return if |
lib |
Parent library for spec |
meta |
Get my effective meta; this does not include synthesized tags like |
metaOwn |
Get my own declared meta-data |
name | |
parent |
Parent spec which contains this spec definition and scopes |
qname |
Return fully qualified name of this spec |
slot |
Convenience for |
slotOwn |
Convenience for |
slots |
Get the effective children slots including inherited |
slotsOwn |
Get the declared children slots |
type |
Type of this spec. |
Slot Details
_id
abstract override Ref _id()
Identifier for a spec is always its qualified name This is a temp shim until we move haystack::Dict
fully into Xeto.
base
abstract Spec? base()
Base spec from which this spec directly inherits its meta and slots. Returns null if this is sys::Obj
itself.
enum
isEnum
abstract Bool isEnum()
Is the base sys::Enum
isMaybe
abstract Bool isMaybe()
Does meta have maybe tag
isa
Return if this
spec inherits from that
from a nominal type perspective. Nonimal typing matches any of the following conditions:
- if
that
matches one ofthis
inherited specs viabase
- if
this
is maybe and that isNone
- if
this
isAnd
andthat
matches anythis.ofs
- if
this
isOr
andthat
matches allthis.ofs
(common base) - if
that
isOr
andthis
matches any ofthat.ofs
lib
abstract Lib lib()
Parent library for spec
meta
abstract Dict meta()
Get my effective meta; this does not include synthesized tags like spec
metaOwn
abstract Dict metaOwn()
Get my own declared meta-data
name
parent
qname
abstract Str qname()
Return fully qualified name of this spec:
- Type specs will return "foo.bar::Baz"
- Global slots will return "foo.bar::baz"
- Type slots will return "foo.bar::Baz.qux"
- Derived specs will return "derived123::{name}"
slot
slotOwn
slots
abstract SpecSlots slots()
Get the effective children slots including inherited
slotsOwn
abstract SpecSlots slotsOwn()
Get the declared children slots
type
abstract Spec type()
Type of this spec. If this spec is a top level type then return self.