Class TypesCtr
- java.lang.Object
-
- org.glassfish.hk2.classmodel.reflect.impl.TypesCtr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TypesCtr.ProxyTask
-
Field Summary
Fields Modifier and Type Field Description private java.util.Stack<TypeProxy>
nonVisited
Stack on type proxy as they have been instantiated in FILO order.private java.util.concurrent.ConcurrentMap<java.lang.Class,java.util.concurrent.ConcurrentMap<java.lang.String,TypeProxy<Type>>>
storage
Storage indexed by TYPE : interface | class | annotation and then by name.private java.util.concurrent.ConcurrentMap<java.lang.String,TypeProxy<Type>>
unknownTypesStorage
Map of encountered types which we don't know if it is an interface, class or annotation
-
Constructor Summary
Constructors Constructor Description TypesCtr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearNonVisitedEntries()
java.util.Collection<Type>
getAllTypes()
Returns a unmodifiable list of collected types obtained during the parsing activity<T extends Type>
TgetBy(java.lang.Class<T> type, java.lang.String name)
Returns a Model instance given a nameType
getBy(java.lang.String name)
Returns a Type instance given a nameTypeProxy<Type>
getHolder(java.lang.String name)
<T extends Type>
TypeProxy<Type>getHolder(java.lang.String name, java.lang.Class<T> type)
void
onNotVisitedEntries(TypesCtr.ProxyTask proxyTask)
Runs a task on each non visited types parsing discovered.
-
-
-
Field Detail
-
storage
private final java.util.concurrent.ConcurrentMap<java.lang.Class,java.util.concurrent.ConcurrentMap<java.lang.String,TypeProxy<Type>>> storage
Storage indexed by TYPE : interface | class | annotation and then by name.
-
unknownTypesStorage
private final java.util.concurrent.ConcurrentMap<java.lang.String,TypeProxy<Type>> unknownTypesStorage
Map of encountered types which we don't know if it is an interface, class or annotation
-
nonVisited
private final java.util.Stack<TypeProxy> nonVisited
Stack on type proxy as they have been instantiated in FILO order.
-
-
Method Detail
-
getBy
public Type getBy(java.lang.String name)
Description copied from interface:Types
Returns a Type instance given a name
-
getBy
public <T extends Type> T getBy(java.lang.Class<T> type, java.lang.String name)
Description copied from interface:Types
Returns a Model instance given a name- Specified by:
getBy
in interfaceTypes
- Parameters:
type
- type of the requested model (seeExtensibleType
derivatives)name
- the requested type name- Returns:
- the type instance or null if not found
-
getHolder
public <T extends Type> TypeProxy<Type> getHolder(java.lang.String name, java.lang.Class<T> type)
-
onNotVisitedEntries
public void onNotVisitedEntries(TypesCtr.ProxyTask proxyTask)
Runs a task on each non visited types parsing discovered.- Parameters:
proxyTask
- the task to run on each non visited type.
-
clearNonVisitedEntries
public void clearNonVisitedEntries()
-
getAllTypes
public java.util.Collection<Type> getAllTypes()
Description copied from interface:Types
Returns a unmodifiable list of collected types obtained during the parsing activity- Specified by:
getAllTypes
in interfaceTypes
- Returns:
- list of types
-
-