Skip to main content

Class: GeneratorModel

Models value generation options for a scalar property.

Extends

Constructors

new GeneratorModel()

new GeneratorModel(state: Readonly<GeneratorOptions>): GeneratorModel

Parameters

ParameterType
stateReadonly<GeneratorOptions>

Returns

GeneratorModel

Overrides

AbstractModel.constructor

Defined in

packages/verse-core/src/model/model.ts:1692

Accessors

default

get default(): unknown

Returns

unknown

Defined in

packages/verse-core/src/model/model.ts:1712


on

get on(): undefined | "add"

Returns

undefined | "add"

Defined in

packages/verse-core/src/model/model.ts:1708


parent

get parent(): undefined | AbstractModel

Returns the parent model element.

Returns

undefined | AbstractModel

The parent model element.

Inherited from

AbstractModel.parent

Defined in

packages/verse-core/src/model/model.ts:74


sequence

get sequence(): undefined | string

Returns

undefined | string

Defined in

packages/verse-core/src/model/model.ts:1704


using

get using(): undefined | Generator

Returns

undefined | Generator

Defined in

packages/verse-core/src/model/model.ts:1700

Methods

accept()

accept<T, S>(visitor: ModelVisitor<T, S>, state?: S): T

Accepts a visitor and returns the result of visiting this model element.

Type Parameters

Type ParameterDefault type
T-
Sunknown

Parameters

ParameterTypeDescription
visitorModelVisitor<T, S>The visitor to accept.
state?SAn optional state to pass to the visitor.

Returns

T

The result of visiting this model element.

Overrides

AbstractModel.accept

Defined in

packages/verse-core/src/model/model.ts:1725


equals()

equals(other: unknown): boolean

Checks if the current object is equal to the provided object.

Parameters

ParameterTypeDescription
otherunknownThe object to compare with.

Returns

boolean

Whether the objects are equal or not.

Overrides

AbstractModel.equals

Defined in

packages/verse-core/src/model/model.ts:1729


hashCode()

hashCode(): number

Returns the hash code of this object.

Returns

number

The hash code.

Overrides

AbstractModel.hashCode

Defined in

packages/verse-core/src/model/model.ts:1739


rewrite()

rewrite(rewriter: ModelRewriter): AbstractModel

Rewrite method for processing a given model with a rewriter.

Parameters

ParameterTypeDescription
rewriterModelRewriterThe rewriter to use for rewriting the model.

Returns

AbstractModel

The rewritten model.

Inherited from

AbstractModel.rewrite

Defined in

packages/verse-core/src/model/model.ts:55


toJSON()

toJSON(): string

Returns a JSON representation of this model element.

Returns

string

The JSON representation.

Inherited from

AbstractModel.toJSON

Defined in

packages/verse-core/src/model/model.ts:82


toObject()

toObject(): {default: unknown;on: undefined | "add";sequence: undefined | string;using: undefined | Generator; }

Returns this instance as a plain object.

Returns

{default: unknown;on: undefined | "add";sequence: undefined | string;using: undefined | Generator; }

The plain object.

default

default: unknown

on

on: undefined | "add"

sequence

sequence: undefined | string

using

using: undefined | Generator

Overrides

AbstractModel.toObject

Defined in

packages/verse-core/src/model/model.ts:1716