| org.apache.tapestry.services.Environment
All known Subclasses: org.apache.tapestry.internal.services.EnvironmentImpl,
Environment | public interface Environment (Code) | | Provides access to environment services, which are almost always provided to enclosed components
by enclosing components.
The Environment acts like a collection of stacks. Each stack contains environmental service
providers of a given type.
|
Method Summary | |
void | clear() Clears all stacks; used when initializing the Environment before a render. | T | peek(Class<T> type) | T | peekRequired(Class<T> type) | T | pop(Class<T> type) Removes and returns the top environmental service of the selected type. | T | push(Class<T> type, T instance) Pushes a new service onto the stack. |
clear | void clear()(Code) | | Clears all stacks; used when initializing the Environment before a render.
|
peek | T peek(Class<T> type)(Code) | | < Parameters: T - >the type of environmental service Parameters: type - class used to select a service the current service of that type, or null if no service of that type has been added |
peekRequired | T peekRequired(Class<T> type)(Code) | | < Parameters: T - >the type of environmental service Parameters: type - class used to select a service the current service throws: RuntimeException - if no service of that type has been added |
pop | T pop(Class<T> type)(Code) | | Removes and returns the top environmental service of the selected type.
< Parameters: T - > Parameters: type - throws: NoSuchElementException - if the environmental stack (for the specified type) is empty |
push | T push(Class<T> type, T instance)(Code) | | Pushes a new service onto the stack. The old service at the top of the stack is returned (it
may be null).
< Parameters: T - > Parameters: type - the type of service to store Parameters: instance - the service instance the previous top service |
|
|