org.apache.felix.webconsole
Class DefaultVariableResolver
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.apache.felix.webconsole.DefaultVariableResolver
- All Implemented Interfaces:
- Serializable, Cloneable, Map, VariableResolver
public class DefaultVariableResolver
- extends HashMap
- implements VariableResolver
The DefaultVariableResolver
is a HashMap
based
default implementation of the VariableResolver
interface. It may
be used by plugins to implement the interface for the request and is also
used by the
WebConsoleUtil.getVariableResolver(javax.servlet.ServletRequest)
as the variable resolver if none has yet been assigned to the request.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry |
Method Summary |
String |
resolve(String variable)
Returns the string representation of the value stored under the variable
name in this map. |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
DefaultVariableResolver
public DefaultVariableResolver()
- Creates a new variable resolver with default capacity.
DefaultVariableResolver
public DefaultVariableResolver(int initialCapacity,
float loadFactor)
- Creates a new variable resolver and initializes both - capacity & load factor
- Parameters:
initialCapacity
- the initial capacity of the variable containerloadFactor
- the load factor of the variable container- See Also:
HashMap.HashMap(int, float)
DefaultVariableResolver
public DefaultVariableResolver(int initialCapacity)
- Creates a new variable resolver with specified initial capacity
- Parameters:
initialCapacity
- the initial capacity of the variable container- See Also:
HashMap.HashMap(int)
DefaultVariableResolver
public DefaultVariableResolver(Map source)
- Creates a new variable resolver copying the variables from the given map.
- Parameters:
source
- the map whose variables are to be placed in this resolver.- See Also:
HashMap.HashMap(Map)
resolve
public String resolve(String variable)
- Returns the string representation of the value stored under the variable
name in this map. If no value is stored under the variable name,
null
is returned.
- Specified by:
resolve
in interface VariableResolver
- Parameters:
variable
- The name of the variable whose value is to be returned.
- Returns:
- The variable value or
null
if there is no entry
with the given name in this map.
Copyright © 2011 Apache Software Foundation. All Rights Reserved.