org.jboss.webbeans.context
Class ContextMap
java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingMap<K,java.util.concurrent.Future<V>>
org.jboss.webbeans.util.ConcurrentCache<java.lang.Class<? extends java.lang.annotation.Annotation>,java.util.List<Context>>
org.jboss.webbeans.context.ContextMap
- All Implemented Interfaces:
- java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.util.concurrent.Future<java.util.List<Context>>>
public class ContextMap
- extends ConcurrentCache<java.lang.Class<? extends java.lang.annotation.Annotation>,java.util.List<Context>>
A map from a scope to a list of contexts
- Author:
- Nicklas Karlsson, Pete Muir
| Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
|
Method Summary |
void |
add(Context context)
Adds a context under a scope type
Creates the list of contexts if it doesn't exist |
AbstractContext |
getBuiltInContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Gets the dependent context |
java.util.List<Context> |
getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Gets the list of context with the given scope type |
java.lang.String |
toString()
|
| Methods inherited from class com.google.common.collect.ForwardingMap |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ContextMap
public ContextMap()
getBuiltInContext
public AbstractContext getBuiltInContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
- Gets the dependent context
- Parameters:
scopeType - The scope type to get
- Returns:
- The dependent context
getContext
public java.util.List<Context> getContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
- Gets the list of context with the given scope type
- Parameters:
scopeType - The scope type to match
- Returns:
- A list of matching contexts. An empty list is returned if there
are no matches
toString
public java.lang.String toString()
- Overrides:
toString in class com.google.common.collect.ForwardingObject
add
public void add(Context context)
- Adds a context under a scope type
Creates the list of contexts if it doesn't exist
- Parameters:
context - The new context
Copyright © 2008-2009. All Rights Reserved.