public class MinimalContext extends SimpleContext
This context disables any access to the parent context (other than through getParent()) and ignores setting any local data.
The MinimalContext requires a none MinimalContext based parent Context for creation. If the parent context is of type MinimalContext, its parent will be used as the parent of the new MinimalContext instance
systemContextNAMESPACES_KEY| Constructor and Description |
|---|
MinimalContext(Context parent) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String name)
Get the value of this variable; delegating to parent.
|
Map<String,Object> |
getVars()
Get the Map of all local variables in this Context.
|
boolean |
has(String name)
Check if this variable exists, delegating to parent.
|
boolean |
hasLocal(String name)
Check if this variable exists, only checking this Context
|
void |
reset()
Clear this Context.
|
void |
set(String name,
Object value)
Assigns a new value to an existing variable or creates a new one.
|
void |
setLocal(String name,
Object value)
Assigns a new value to an existing variable or creates a new one.
|
protected void |
setVars(Map<String,Object> vars)
Set the variables map.
|
getLog, getParent, getSystemContext, setLogpublic MinimalContext(Context parent)
public void set(String name, Object value)
SimpleContextset in interface Contextset in class SimpleContextname - The variable namevalue - The variable valueContext.set(String, Object)public Object get(String name)
SimpleContextget in interface Contextget in class SimpleContextname - The variable nameContext.get(java.lang.String)public boolean has(String name)
SimpleContexthas in interface Contexthas in class SimpleContextname - The variable nameContext.has(java.lang.String)public boolean hasLocal(String name)
SimpleContexthasLocal in interface ContexthasLocal in class SimpleContextname - The variable nameContext.hasLocal(java.lang.String)public void reset()
SimpleContextreset in interface Contextreset in class SimpleContextContext.reset()public void setLocal(String name, Object value)
SimpleContextsetLocal in interface ContextsetLocal in class SimpleContextname - The variable namevalue - The variable valueContext.setLocal(String, Object)protected void setVars(Map<String,Object> vars)
SimpleContextsetVars in class SimpleContextvars - The new Map of variables.public Map<String,Object> getVars()
SimpleContextgetVars in interface ContextgetVars in class SimpleContextContext.getParent()Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.