public class VariableContextScriptBindings extends Object implements Bindings
Bindings
implementation wrapping a provided
VariableContext
and Bindings
instance.
Enhances the Bindings with the variables resolvable through the VariableContext
.
The variables are treated as read only: all mutating operations write through to the
wrapped Bindings
.Modifier and Type | Field and Description |
---|---|
protected VariableContext |
variableContext |
protected Bindings |
wrappedBindings |
Constructor and Description |
---|
VariableContextScriptBindings(Bindings wrappedBindings,
VariableContext variableContext) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
calculateBindingMap() |
void |
clear() |
boolean |
containsKey(Object key)
Dedicated implementation which does not fall back on the
calculateBindingMap() for performance reasons |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key)
Dedicated implementation which does not fall back on the
calculateBindingMap() for performance reasons |
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String name,
Object value)
Dedicated implementation which does not fall back on the
calculateBindingMap() for performance reasons |
void |
putAll(Map<? extends String,?> toMerge) |
Object |
remove(Object key) |
int |
size() |
protected Object |
unpack(TypedValue resolvedValue) |
Collection<Object> |
values() |
static VariableContextScriptBindings |
wrap(Bindings wrappedBindings,
VariableContext variableContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected Bindings wrappedBindings
protected VariableContext variableContext
public VariableContextScriptBindings(Bindings wrappedBindings, VariableContext variableContext)
public boolean containsKey(Object key)
calculateBindingMap()
for performance reasonscontainsKey
in interface Map<String,Object>
containsKey
in interface Bindings
public Object get(Object key)
calculateBindingMap()
for performance reasonspublic Object put(String name, Object value)
calculateBindingMap()
for performance reasonspublic boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
protected Object unpack(TypedValue resolvedValue)
public static VariableContextScriptBindings wrap(Bindings wrappedBindings, VariableContext variableContext)
Copyright © 2021. All rights reserved.