public static class Variant.ScopedClosureVariant extends Variant.ClosureVariant
call(Object...) to run the closure.isPropertyVariant.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 |
|---|---|
UIComponentData |
scope
The scope to call the closure in.
|
requireNonnullClosurecontext, definitionType, NULL, origin| Constructor and Description |
|---|
ScopedClosureVariant(ClosureHolder data,
Type valueType,
Variant.Origin origin,
boolean requireNonnullClosure,
UIComponentData scope,
LspsContextHolder contextHolder)
Creates the variant.
|
| Modifier and Type | Method and Description |
|---|---|
Variant<Object> |
call(Object... params)
Executes closure within context of the given component.
|
Variant.ScopedClosureVariant |
requireNonnullClosure()
If the closure is null, closure execution fails.
|
inScope, inScope, noScopebool, 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, wrappublic final UIComponentData scope
public ScopedClosureVariant(ClosureHolder data, Type valueType, Variant.Origin origin, boolean requireNonnullClosure, UIComponentData scope, 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 - scope - the scope in which the closure should be executed, may be null.contextHolder - public Variant.ScopedClosureVariant requireNonnullClosure()
call(Object...) is to return null.requireNonnullClosure in class Variant.ClosureVariantpublic Variant<Object> call(Object... params)
requireNonnullClosure() has been called).params - optional closure parameters, may be null.Variant.definitionType is the result of the closure (ClosureType.getReturnType()) unless
the closure is null - in that case the type is null.Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.