Package oracle.dbtools.plugin.api.types

## Class TypeReflections

- java.lang.Object
- - oracle.dbtools.plugin.api.types.TypeReflections

- All Implemented Interfaces:
    `java.lang.Iterable<TypeReflection<?>>`, `TypeLocator`

      public class TypeReflections
      extends java.lang.Object
      implements TypeLocator, java.lang.Iterable<TypeReflection<?>>

  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
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `TypeReflections.Builder` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static TypeReflections.Builder` | `builder()` | Produce a new `TypeReflections.Builder` instance
    `boolean` | `contains​(java.lang.Class<?> type)` | Indicates if the specified type is known to this `TypeReflections` set
    `boolean` | `equals​(java.lang.Object obj)` |
    `<T> TypeReflection<T>` | `forType​(java.lang.Class<T> type)` | Returns the `TypeReflection` for the specified type, note the type must be part of this `TypeReflections` set
    `<T> TypeReflection<T>` | `get​(java.lang.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
    `java.util.Iterator<TypeReflection<?>>` | `iterator()` |
    `static java.lang.invoke.MethodHandles.Lookup` | `lookup()` | Provide the `MethodHandles.Lookup` service used for reflective constructor invocation
    `TypeReflections.Builder` | `modify()` | Modify this `TypeReflections` set.
    `<T> java.util.Set<TypeReflection<? extends T>>` | `selectType​(TypeQualifier<T> service)` | Choose the `TypeReflection`s that matches the specified criteria
    `Instances` | `singletons()` | Provides access to singleton fields annotated with `Provides`
    `java.lang.String` | `toString()` |
    `java.util.Set<java.lang.Class<?>>` | `types()` | Enumerate the types in this `TypeReflections` set

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Method Detail

    - #### contains

          public boolean contains​(java.lang.Class<?> type)

      Indicates if the specified type is known to this `TypeReflections` set
      Parameters:
        `type` - The type to search for
      Returns:
        true if the type is present, false otherwise

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### forType

          public <T> TypeReflection<T> forType​(java.lang.Class<T> type)
                                        throws java.lang.IllegalArgumentException

      Returns the `TypeReflection` for the specified type, note the type must be part of this `TypeReflections` set
      Specified by:
        `forType` in interface `TypeLocator`
      Type Parameters:
        `T` - The type to search for
      Parameters:
        `type` - The type to lookup
      Returns:
        `TypeReflection` instance
      Throws:
        `java.lang.IllegalArgumentException` - if the type is not part of this type reflection set

    - #### get

          public <T> TypeReflection<T> get​(java.lang.Class<T> type)
                                    throws java.lang.IllegalArgumentException

      Synonym for `forType(Class)`
      Specified by:
        `get` in interface `TypeLocator`
      Type Parameters:
        `T` - The type to search for
      Parameters:
        `type` - The type to lookup
      Returns:
        `TypeReflection` instance
      Throws:
        `java.lang.IllegalArgumentException` - if the type is not part of this type reflection set

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### isIgnored

          public boolean isIgnored​(TypeQualifier<?> service)

      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

          public java.util.Iterator<TypeReflection<?>> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<TypeReflection<?>>`

    - #### modify

          public TypeReflections.Builder modify()

      Modify this `TypeReflections` set. Produces a `TypeReflections.Builder` instance initialized with the state of this `TypeReflections` set.
      Returns:
        `TypeReflections.Builder` instance

    - #### selectType

          public <T> java.util.Set<TypeReflection<? extends T>> selectType​(TypeQualifier<T> service)

      Description copied from interface: `TypeLocator`
      Choose the `TypeReflection`s that matches the specified criteria
      Specified by:
        `selectType` in interface `TypeLocator`
      Type Parameters:
        `T` - The type of the service to find
      Parameters:
        `service` - The qualifiers on the service
      Returns:
        `Set` of matching `TypeReflection` instances

    - #### singletons

          public Instances singletons()

      Provides access to singleton fields annotated with `Provides`
      Returns:
        `Instances` instance which can be used to resolve singleton fields

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### types

          public java.util.Set<java.lang.Class<?>> types()

      Enumerate the types in this `TypeReflections` set
      Returns:
        `Set` of `Class` instances

    - #### builder

          public static TypeReflections.Builder builder()

      Produce a new `TypeReflections.Builder` instance
      Returns:
        `TypeReflections.Builder` instance

    - #### lookup

          public static java.lang.invoke.MethodHandles.Lookup lookup()

      Provide the `MethodHandles.Lookup` service used for reflective constructor invocation
      Returns:
        `MethodHandles.Lookup` instance