Class Scope<T>
- java.lang.Object
-
- software.amazon.awssdk.services.cloudformation.endpoints.internal.Scope<T>
-
public class Scope<T> extends Object
-
-
Constructor Summary
Constructors Constructor Description Scope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<T>
eval(Expr expr)
Search the fact stack for an explicitly calculated value for [expr]T
expectValue(Identifier name)
Optional<T>
getValue(Identifier name)
<U> U
inScope(Supplier<U> func)
void
insert(String name, T value)
void
insert(Identifier name, T value)
void
insertFact(Expr name, T value)
void
pop()
void
push()
String
toString()
-
-
-
Method Detail
-
push
public void push()
-
pop
public void pop()
-
insert
public void insert(Identifier name, T value)
-
inScope
public <U> U inScope(Supplier<U> func)
-
eval
public Optional<T> eval(Expr expr)
Search the fact stack for an explicitly calculated value for [expr]Currently, this is only impacted by the `isSet` function which will record `T`, rather than
Option<T>
for its arguments- Parameters:
expr
- The expression to evaluate- Returns:
- The value from the scope
-
expectValue
public T expectValue(Identifier name)
-
getValue
public Optional<T> getValue(Identifier name)
-
-