Skip to main content

Class: abstract ReferencePropertyModel

Base class for reference property models.

Extends

Extended by

Constructors

new ReferencePropertyModel()

protected new ReferencePropertyModel(state: Readonly<ReferencePropertyModelState>): ReferencePropertyModel

Parameters

ParameterType
stateReadonly<ReferencePropertyModelState>

Returns

ReferencePropertyModel

Overrides

PropertyModel.constructor

Defined in

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

Accessors

name

get name(): string

Returns

string

Overrides

PropertyModel.name

Defined in

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


parent

get parent(): EntityModel<any, any>

Returns the parent model element.

Returns

EntityModel<any, any>

The parent model element.

Overrides

PropertyModel.parent

Defined in

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


state

get protected state(): Readonly<ReferencePropertyModelState>

Returns

Readonly<ReferencePropertyModelState>

Defined in

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


target

get target(): StructuralModel

Returns

StructuralModel

Defined in

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


targetName

get targetName(): string

Returns

string

Defined in

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

Methods

accept()

abstract 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.

Inherited from

PropertyModel.accept

Defined in

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


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

PropertyModel.equals

Defined in

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


hashCode()

hashCode(): number

Returns the hash code of this object.

Returns

number

The hash code.

Overrides

PropertyModel.hashCode

Defined in

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


merge()

merge(override?: PropertyModel): PropertyModel

Parameters

ParameterType
override?PropertyModel

Returns

PropertyModel

Inherited from

PropertyModel.merge

Defined in

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


resolveTarget()

abstract protected resolveTarget(): StructuralModel

Returns

StructuralModel

Defined in

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


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

PropertyModel.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

PropertyModel.toJSON

Defined in

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


toObject()

toObject(): {name: string;target: string; }

Returns this instance as a plain object.

Returns

{name: string;target: string; }

The plain object.

name

name: string

target

target: string

Overrides

PropertyModel.toObject

Defined in

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