oracle.dbtools.plugin.api.types

## Class TypeReflections

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

- All Implemented Interfaces:
    Iterable<TypeReflection<?>>, TypeLocator

      public class TypeReflections
      extends Object
      implements TypeLocator, 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 and Description
    --- | ---
    `static class` | `TypeReflections.Builder`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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 `TypeReflection`s 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

    - ### 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(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(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### forType

          public <T> TypeReflection<T> forType(Class<T> type)
                                        throws 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:
        `IllegalArgumentException` - if the type is not part of this type reflection set

    - #### get

          public <T> TypeReflection<T> get(Class<T> type)
                                    throws 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:
        `IllegalArgumentException` - if the type is not part of this type reflection set

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `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 Iterator<TypeReflection<?>> iterator()

      Specified by:
        `iterator` in interface `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> 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 String toString()

      Overrides:
        `toString` in class `Object`

    - #### types

          public Set<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 MethodHandles.Lookup lookup()

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

Copyright © 2010, 2022, Oracle and/or its affiliates.