Package oracle.dbtools.plugin.api.types
Class TypeReflections
java.lang.Object
oracle.dbtools.plugin.api.types.TypeReflections
- All Implemented Interfaces:
Iterable<TypeReflection<?>>,TypeLocator
Represents a set of
Class instances that may be instantiated and injected using InstanceLocator- Since:
- 19.3.0
- Author:
- cdivilly
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeReflections.Builderbuilder()Produce a newTypeReflections.BuilderinstancebooleanIndicates if the specified type is known to thisTypeReflectionssetboolean<T> TypeReflection<T>Returns theTypeReflectionfor the specified type, note the type must be part of thisTypeReflectionsset<T> TypeReflection<T>Synonym forforType(Class)inthashCode()booleanisIgnored(TypeQualifier<?> service) Determines if the specified service type has been marked as ignored in this type setiterator()static MethodHandles.Lookuplookup()Provide theMethodHandles.Lookupservice used for reflective constructor invocationmodify()Modify thisTypeReflectionsset.<T> Set<TypeReflection<? extends T>>selectType(TypeQualifier<T> service) Choose theTypeReflections that matches the specified criteriaProvides access to singleton fields annotated withProvidestoString()types()Enumerate the types in thisTypeReflectionssetMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
contains
Indicates if the specified type is known to thisTypeReflectionsset- Parameters:
type- The type to search for- Returns:
- true if the type is present, false otherwise
-
equals
-
forType
Returns theTypeReflectionfor the specified type, note the type must be part of thisTypeReflectionsset- Specified by:
forTypein interfaceTypeLocator- Type Parameters:
T- The type to search for- Parameters:
type- The type to lookup- Returns:
TypeReflectioninstance- Throws:
IllegalArgumentException- if the type is not part of this type reflection set
-
get
Synonym forforType(Class)- Specified by:
getin interfaceTypeLocator- Type Parameters:
T- The type to search for- Parameters:
type- The type to lookup- Returns:
TypeReflectioninstance- Throws:
IllegalArgumentException- if the type is not part of this type reflection set
-
hashCode
public int hashCode() -
isIgnored
Determines if the specified service type has been marked as ignored in this type set- Parameters:
service- The service to check- Returns:
- true if the service is ignored, false otherwise
-
iterator
- Specified by:
iteratorin interfaceIterable<TypeReflection<?>>
-
modify
Modify thisTypeReflectionsset. Produces aTypeReflections.Builderinstance initialized with the state of thisTypeReflectionsset.- Returns:
TypeReflections.Builderinstance
-
selectType
Description copied from interface:TypeLocatorChoose theTypeReflections that matches the specified criteria- Specified by:
selectTypein interfaceTypeLocator- Type Parameters:
T- The type of the service to find- Parameters:
service- The qualifiers on the service- Returns:
Setof matchingTypeReflectioninstances
-
singletons
Provides access to singleton fields annotated withProvides- Returns:
Instancesinstance which can be used to resolve singleton fields
-
toString
-
types
Enumerate the types in thisTypeReflectionsset -
builder
Produce a newTypeReflections.Builderinstance- Returns:
TypeReflections.Builderinstance
-
lookup
Provide theMethodHandles.Lookupservice used for reflective constructor invocation- Returns:
MethodHandles.Lookupinstance
-