|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.component.ComponentIndex<V>
public class ComponentIndex<V>
Constructor Summary | |
---|---|
ComponentIndex()
Creates a component index that indexes by all super types and interfaces of supplied type. |
|
ComponentIndex(boolean indexByAllTypes)
Creates a component index. |
Method Summary | |
---|---|
void |
add(java.lang.ClassLoader classLoader,
java.lang.Class<?> type,
java.lang.String roleHint,
V value)
Associate a value with the specified class loader, type and roleHint. |
java.util.Collection<V> |
clear()
Removes all values from this index. |
V |
get(java.lang.Class<?> type,
java.lang.String roleHint)
Gets the value associated with the specified type and roleHint. |
V |
get(java.lang.Class<?> type,
java.lang.String roleHint,
java.lang.ClassLoader classLoader)
Gets the value associated with the specified type and roleHint. |
java.util.Collection<V> |
getAll()
|
java.util.List<V> |
getAll(java.lang.Class<?> type)
Gets all values associated with the specified type. |
java.util.List<V> |
getAll(java.lang.Class<?> type,
java.lang.ClassLoader classLoader)
Gets all values associated with the specified type. |
java.util.Map<java.lang.String,V> |
getAllAsMap(java.lang.Class<?> type)
Gets a map of all values associated with the specified type indexed by roleHint. |
java.util.Map<java.lang.String,V> |
getAllAsMap(java.lang.Class<?> type,
java.lang.ClassLoader classLoader)
Gets a map of all values associated with the specified type indexed by roleHint. |
boolean |
isIndexByAllTypes()
Are values are indexed by all super types and interfaces of supplied type? |
void |
remove(V value)
Removes the specified value from the index. |
java.util.List<V> |
removeAll(java.lang.ClassLoader classLoader)
Removes all values associated with the specified class loader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentIndex()
public ComponentIndex(boolean indexByAllTypes)
indexByAllTypes
- if true, values are indexed by all super types and interfaces of supplied type; otherwise
values are only indexed by supplied typeMethod Detail |
---|
public boolean isIndexByAllTypes()
public V get(java.lang.Class<?> type, java.lang.String roleHint)
type
- the type (or super type if enabled) associated with the value; not nullroleHint
- the roleHint associated with the value, or null for the default roleHint
public V get(java.lang.Class<?> type, java.lang.String roleHint, java.lang.ClassLoader classLoader)
type
- the type (or super type if enabled) associated with the value; not nullroleHint
- the roleHint associated with the value, or null for the default roleHintclassLoader
- the class loader to search from
public java.util.Collection<V> getAll()
public java.util.List<V> getAll(java.lang.Class<?> type)
type
- the type (or super type if enabled) associated with the value; not null
public java.util.List<V> getAll(java.lang.Class<?> type, java.lang.ClassLoader classLoader)
type
- the type (or super type if enabled) associated with the value; not nullclassLoader
- the class loader to search from
public java.util.Map<java.lang.String,V> getAllAsMap(java.lang.Class<?> type)
type
- the type (or super type if enabled) associated with the value; not null
public java.util.Map<java.lang.String,V> getAllAsMap(java.lang.Class<?> type, java.lang.ClassLoader classLoader)
type
- the type (or super type if enabled) associated with the value; not nullclassLoader
- the class loader to search from
public void add(java.lang.ClassLoader classLoader, java.lang.Class<?> type, java.lang.String roleHint, V value)
public void remove(V value)
value
- the value to removepublic java.util.List<V> removeAll(java.lang.ClassLoader classLoader)
public java.util.Collection<V> clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |