org.eclipse.hyades.loaders.util
Class GenericLookupService
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.eclipse.hyades.loaders.util.GenericLookupService
- All Implemented Interfaces:
- java.lang.Cloneable, LookupService, java.util.Map, java.io.Serializable
- Direct Known Subclasses:
- CBELookupService, HierarchyLookupService, StatisticalLookupService, TraceLookupService
- public abstract class GenericLookupService
- extends java.util.HashMap
- implements LookupService
- See Also:
- Serialized Form
|
Field Summary |
protected java.util.HashSet |
types
|
|
Method Summary |
protected void |
addOrRemove(IntToObjectMap map,
int key,
java.lang.Object object,
boolean remove)
|
protected void |
addOrRemove(LongToObjectMap map,
long key,
java.lang.Object object,
boolean remove)
|
protected void |
addOrRemove(java.util.Map map,
java.lang.Object key,
java.lang.Object object,
boolean remove)
|
protected java.util.Map |
createMap(java.lang.Class equivalentType)
|
boolean |
deregister(HierarchyContext context)
|
boolean |
deregister(HierarchyContext context,
java.lang.Class type)
|
boolean |
deregister(HierarchyContext context,
java.lang.Class type,
java.lang.Object key)
|
boolean |
deregister(HierarchyContext context,
java.lang.Object object)
|
protected abstract boolean |
doProcessObject(java.util.Map typeMap,
java.lang.Class theClass,
java.lang.Object object,
boolean remove)
|
protected java.util.Map |
getContextMap(HierarchyContext context,
boolean createMap)
|
protected java.lang.Class |
getEquivalentClass(java.lang.Class type)
|
java.util.Set |
getSupportedTypes()
|
protected java.util.Map |
getTypeMap(HierarchyContext context,
java.lang.Class type,
boolean create)
|
java.lang.Object |
locate(HierarchyContext context,
java.lang.Class type,
java.lang.Object key)
|
java.lang.Object |
locate(HierarchyContext context,
java.lang.Object key)
|
boolean |
register(HierarchyContext context,
java.lang.Object object)
|
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
types
protected java.util.HashSet types
GenericLookupService
public GenericLookupService()
getSupportedTypes
public final java.util.Set getSupportedTypes()
- Specified by:
getSupportedTypes in interface LookupService
deregister
public boolean deregister(HierarchyContext context,
java.lang.Class type,
java.lang.Object key)
- Specified by:
deregister in interface LookupService
deregister
public final boolean deregister(HierarchyContext context,
java.lang.Object object)
- Specified by:
deregister in interface LookupService
locate
public java.lang.Object locate(HierarchyContext context,
java.lang.Class type,
java.lang.Object key)
- Specified by:
locate in interface LookupService
locate
public java.lang.Object locate(HierarchyContext context,
java.lang.Object key)
- Specified by:
locate in interface LookupService
register
public final boolean register(HierarchyContext context,
java.lang.Object object)
- Specified by:
register in interface LookupService
deregister
public boolean deregister(HierarchyContext context,
java.lang.Class type)
- Specified by:
deregister in interface LookupService
deregister
public boolean deregister(HierarchyContext context)
- Specified by:
deregister in interface LookupService
getContextMap
protected java.util.Map getContextMap(HierarchyContext context,
boolean createMap)
doProcessObject
protected abstract boolean doProcessObject(java.util.Map typeMap,
java.lang.Class theClass,
java.lang.Object object,
boolean remove)
addOrRemove
protected final void addOrRemove(java.util.Map map,
java.lang.Object key,
java.lang.Object object,
boolean remove)
addOrRemove
protected final void addOrRemove(IntToObjectMap map,
int key,
java.lang.Object object,
boolean remove)
addOrRemove
protected final void addOrRemove(LongToObjectMap map,
long key,
java.lang.Object object,
boolean remove)
getTypeMap
protected java.util.Map getTypeMap(HierarchyContext context,
java.lang.Class type,
boolean create)
createMap
protected java.util.Map createMap(java.lang.Class equivalentType)
getEquivalentClass
protected java.lang.Class getEquivalentClass(java.lang.Class type)
- Returns:
- true if we should use isAssignableFrom for this type (then I will search through all supported types to see if this type can be assignable from one of them)