oracle.dbtools.plugin.api.types

## Class TypeReflection<T>

- java.lang.Object
- - oracle.dbtools.plugin.api.types.TypeReflection<T>

- Type Parameters:
    `T` - The Type being reflected
  All Implemented Interfaces:
    Comparable<TypeReflection<?>>

      public class TypeReflection<T>
      extends Object
      implements Comparable<TypeReflection<?>>

  Provides higher level abstraction about the type metadata of a `Class`, providing information about it's dependencies and what services it provides
  Since:
    19.3.0
  Author:
    cdivilly

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(TypeReflection<?> o)`
    `List<oracle.dbtools.plugin.api.types.TypeConstantField<?>>` | `constantFields()` Enumerate the static constant fields in this type if any
    `TypeDependencies<T>` | `dependencies()` Provides the dependencies of this type
    `boolean` | `equals(Object obj)`
    `<A extends Annotation> A` | `getAnnotation(Class<A> annotationClass)` Returns this element's annotation for the specified type if such an annotation is present, else null.
    `int` | `hashCode()`
    `TypeInstantiator<T>` | `instantiator()` Retrieve the `TypeInstantiator` for this type
    `boolean` | `isConcrete()` Indicates if this type can be instantiated
    `Set<TypeQualifier<?>>` | `provides()` Identifies the services that this type provides
    `Annotation` | `scope()`
    `String` | `toString()`
    `Class<T>` | `type()` Provides the underlying type
    `TypeProvider<T>` | `using(InstanceLocator locator)` Generates a `TypeProvider` for this type, using the specified `InstanceLocator` to resolve dependencies of the type

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

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

- - ### Method Detail

    - #### compareTo

          public int compareTo(TypeReflection<?> o)

      Specified by:
        `compareTo` in interface `Comparable<TypeReflection<?>>`

    - #### constantFields

          public List<oracle.dbtools.plugin.api.types.TypeConstantField<?>> constantFields()

      Enumerate the static constant fields in this type if any
      Returns:
        `List` of `TypeConstantField` instances

    - #### dependencies

          public TypeDependencies<T> dependencies()

      Provides the dependencies of this type
      Returns:
        `TypeDependencies` instance

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getAnnotation

          public <A extends Annotation> A getAnnotation(Class<A> annotationClass)

      Returns this element's annotation for the specified type if such an annotation is present, else null.
      Type Parameters:
        `A` - the type of the annotation to query for and return if present
      Parameters:
        `annotationClass` - the Class object corresponding to the annotation type
      Returns:
        this element's annotation for the specified annotation type if present on this element, else null
      Throws:
        `NullPointerException` - if the given annotation class is null

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### instantiator

          public TypeInstantiator<T> instantiator()

      Retrieve the `TypeInstantiator` for this type
      Returns:
        `TypeInstantiator` instance

    - #### isConcrete

          public boolean isConcrete()

      Indicates if this type can be instantiated
      Returns:
        true if the type can be instantiated, false otherwise

    - #### provides

          public Set<TypeQualifier<?>> provides()

      Identifies the services that this type provides
      Returns:
        `Set` of `TypeQualifier` instances identifying the services this type provides

    - #### scope

          public Annotation scope()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### type

          public Class<T> type()

      Provides the underlying type
      Returns:
        `Class` instance

    - #### using

          public TypeProvider<T> using(InstanceLocator locator)

      Generates a `TypeProvider` for this type, using the specified `InstanceLocator` to resolve dependencies of the type
      Parameters:
        `locator` - Provides the dependencies of this type
      Returns:
        `TypeProvider` instance

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