public static class Variant.ClosureVariant extends Variant<ClosureHolder>
isProperty
Variant.ClosureResultOrigin, Variant.ClosureVariant, Variant.CollectionVariant<T extends Collection<V>,V>, Variant.DereferenceOrigin, Variant.ListVariant<V>, Variant.MapVariant<K,V>, Variant.MethodResultOrigin, Variant.Origin, Variant.PropertyOrigin, Variant.RecordOrigin, Variant.RecordVariant, Variant.ReferenceOrigin, Variant.ScopedClosureVariant
Modifier and Type | Field and Description |
---|---|
protected boolean |
requireNonnullClosure |
context, definitionType, NULL, origin
Constructor and Description |
---|
ClosureVariant(ClosureHolder data,
Type valueType,
Variant.Origin origin,
boolean requireNonnullClosure,
LspsContextHolder contextHolder)
Creates the variant.
|
Modifier and Type | Method and Description |
---|---|
Variant.ScopedClosureVariant |
inScope(UIComponent scope)
Sets the scope of the variant.
|
Variant.ScopedClosureVariant |
inScope(UIComponentData scope)
Sets the scope of the variant.
|
Variant.ScopedClosureVariant |
noScope()
The new Forms UI has no scopes :) Do not call from the old UI code - every UI component has a scope which must be set with
inScope(UIComponent) . |
Variant.ClosureVariant |
requireNonnullClosure()
If the closure is null, closure execution fails.
|
bool, cast, checkPresent, closure, collection, collectionOf, date, decimal, definitionOf, definitionOf, dereference, enumerationConstant, enumValueOf, enumValueOfIgnoreCase, equals, fail, fail, get, getHandle, getInstanceType, getOrigin, hasHandle, hashCode, instanceOf, integer, isAbsent, isClosure, isPath, isPresent, isProperty, isPropertyPath, isRecord, list, listHolder, listOf, map, mapHolder, mapOf, ofOrigin, ofUnknownOrigin, ofUnknownOrigin, or, orVariant, param, path, property, propertyPath, record, reference, requireDefined, set, setHolder, setOf, setReferencedValue, setReferencedValueCollection, startTransaction, string, toNull, toString, toUpperCase, toValue, valueOrNull, wrap
public ClosureVariant(ClosureHolder data, Type valueType, Variant.Origin origin, boolean requireNonnullClosure, LspsContextHolder contextHolder)
data
- the value, may be null.valueType
- The type of the value, either the record property type, or the closure result type. null: see Variant.requireDefined()
.origin
- The value origin, such as "ui::Geolocation.latitude".requireNonnullClosure
- contextHolder
- used to serialize ValueHolders.public Variant.ScopedClosureVariant inScope(UIComponentData scope)
scope
- optional scope in which the closure should be executed. May not be null.public Variant.ScopedClosureVariant noScope()
inScope(UIComponent)
.public Variant.ScopedClosureVariant inScope(UIComponent scope)
scope
- optional scope in which the closure should be executed. May not be null.public Variant.ClosureVariant requireNonnullClosure()
Variant.ScopedClosureVariant.call(Object...)
is to return null.Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.