public class TypeReflections extends Object implements TypeLocator, Iterable<TypeReflection<?>>
Class instances that may be instantiated and injected using InstanceLocator| Modifier and Type | Class and Description |
|---|---|
static class |
TypeReflections.Builder |
| Modifier and Type | Method and Description |
|---|---|
static TypeReflections.Builder |
builder()
Produce a new
TypeReflections.Builder instance |
boolean |
contains(Class<?> type)
Indicates if the specified type is known to this
TypeReflections set |
boolean |
equals(Object obj) |
<T> TypeReflection<T> |
forType(Class<T> type)
Returns the
TypeReflection for the specified type, note the type must be part of this TypeReflections set |
<T> TypeReflection<T> |
get(Class<T> type)
Synonym for
forType(Class) |
int |
hashCode() |
boolean |
isIgnored(TypeQualifier<?> service)
Determines if the specified service type has been marked as ignored in this type set
|
Iterator<TypeReflection<?>> |
iterator() |
static MethodHandles.Lookup |
lookup()
Provide the
MethodHandles.Lookup service used for reflective constructor invocation |
TypeReflections.Builder |
modify()
Modify this
TypeReflections set. |
<T> Set<TypeReflection<? extends T>> |
selectType(TypeQualifier<T> service)
Choose the
TypeReflections that matches the specified criteria |
Instances |
singletons()
Provides access to singleton fields annotated with
Provides |
String |
toString() |
Set<Class<?>> |
types()
Enumerate the types in this
TypeReflections set |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic boolean contains(Class<?> type)
TypeReflections settype - The type to search forpublic <T> TypeReflection<T> forType(Class<T> type) throws IllegalArgumentException
TypeReflection for the specified type, note the type must be part of this TypeReflections setforType in interface TypeLocatorT - The type to search fortype - The type to lookupTypeReflection instanceIllegalArgumentException - if the type is not part of this type reflection setpublic <T> TypeReflection<T> get(Class<T> type) throws IllegalArgumentException
forType(Class)get in interface TypeLocatorT - The type to search fortype - The type to lookupTypeReflection instanceIllegalArgumentException - if the type is not part of this type reflection setpublic boolean isIgnored(TypeQualifier<?> service)
service - The service to checkpublic Iterator<TypeReflection<?>> iterator()
iterator in interface Iterable<TypeReflection<?>>public TypeReflections.Builder modify()
TypeReflections set. Produces a TypeReflections.Builder instance initialized with the state of this TypeReflections set.TypeReflections.Builder instancepublic <T> Set<TypeReflection<? extends T>> selectType(TypeQualifier<T> service)
TypeLocatorTypeReflections that matches the specified criteriaselectType in interface TypeLocatorT - The type of the service to findservice - The qualifiers on the serviceSet of matching TypeReflection instancespublic Instances singletons()
ProvidesInstances instance which can be used to resolve singleton fieldspublic Set<Class<?>> types()
TypeReflections setpublic static TypeReflections.Builder builder()
TypeReflections.Builder instanceTypeReflections.Builder instancepublic static MethodHandles.Lookup lookup()
MethodHandles.Lookup service used for reflective constructor invocationMethodHandles.Lookup instance