Meta information
Page contents
metaInfo property
The library declares metaInfo property for IState and Transition types. MetaInfo is a marker interface allowing to attach some static information to library primitives. This mechanism is extendable and users may add their own MetaInfo sub interfaces/classes if necessary.
MetaInfo considered to be immutable data by design
MetaInfo composition
If you need to specify more than one MetaInfo instance for IState or Transition you have two options:
-
Use
CompositeMetaInfowhich is constructed bybuildCompositeMetaInfobuilder function. This composite type allows to specify a set ofMetaInfoobjects.Limitations:
CompositeMetaInfocannot nest into each other. Only one layer is supported.- Don’t try to specify
MetaInfoof same type multiple times. This is wrong by design. CertainMetaInfosubtype should be applied only once. Exception will be thrown otherwise.
-
Manually implement all required
MetaInfointerfaces in a single object.
Both options are supported, choose any one you like more.
Built-in MetaInfo subclasses
- One of standard implementations is
UmlMetaInfowhich is useful for export feature. See controlling export output. You can build it usingbuildUmlMetaInfo()function. IgnoreUnsafeCallConditionalLambdasMetaInfoandExportMetaInfoare also used by export feature. See controlling export output.