Skip to content

ConditionalAttributeImpl

ConditionalAttributeImpl resolves one of two attribute branches based on a condition expression.

new ConditionalAttributeImpl(idValue, exprValue, truthyValue, falsyValue, factoryValue): ConditionalAttributeImpl

constructor initializes the conditional attribute state.

number

Attribute

Attribute

AttributeFactory

ConditionalAttributeImpl

addQualifier(qualifierValue): Attribute

addQualifier appends the same qualifier to both conditional branches.

Qualifier

Attribute

Attribute.addQualifier


id(): number

id returns a stable expression id for the conditional attribute.

number

Attribute.id


isOptional(): boolean

isOptional returns false because optionality is carried by nested qualifiers.

boolean

Attribute.isOptional


qualify(vars, obj): unknown

qualify resolves the attribute and applies it to the target object.

Activation

unknown

unknown

Attribute.qualify


qualifyIfPresent(vars, obj, presenceOnly): unknown

qualifyIfPresent resolves the attribute and applies a presence-tested qualification.

Activation

unknown

boolean

unknown

Attribute.qualifyIfPresent


resolve(vars): unknown

resolve evaluates the condition and then resolves the selected branch.

Activation

unknown

Attribute.resolve


resolveExhaustively(vars): unknown

resolveExhaustively evaluates both branches before returning the condition-selected result.

Activation

unknown