public class EnvironmentImpl extends Object implements Environment
Constructor and Description |
---|
EnvironmentImpl() |
Modifier and Type | Method and Description |
---|---|
void |
cloak()
Hides all current environment values, making the Environment object appear empty, until
a call to
Environment.decloak() } restores the original state. |
void |
decloak()
Restores state previously hidden by
Environment.cloak() }. |
<T> T |
peek(Class<T> type)
Peeks at the current top of the indicated stack.
|
<T> T |
peekRequired(Class<T> type)
Peeks at the current top of the indicated stack (which must have a non-null value).
|
<T> T |
pop(Class<T> type)
Removes and returns the top environmental object of the selected type.
|
<T> T |
push(Class<T> type,
T instance)
Pushes a new service onto the stack.
|
void |
threadDidCleanup() |
public EnvironmentImpl()
public <T> T peek(Class<T> type)
Environment
peek
in interface Environment
T
- the type of environmental objecttype
- class used to select the objectpublic <T> T peekRequired(Class<T> type)
Environment
peekRequired
in interface Environment
T
- the type of environmental objecttype
- class used to select the objectpublic <T> T pop(Class<T> type)
Environment
pop
in interface Environment
T
- the type of environmental objecttype
- class used to select the objectpublic <T> T push(Class<T> type, T instance)
Environment
push
in interface Environment
T
- the type of environmental objecttype
- class used to select the objectinstance
- the service objectpublic void threadDidCleanup()
public void cloak()
Environment
Environment.decloak()
} restores the original state.cloak
in interface Environment
TapestryConstants.RESPONSE_RENDERER
public void decloak()
Environment
Environment.cloak()
}.decloak
in interface Environment
TapestryConstants.RESPONSE_RENDERER
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.