oracle.dbtools.plugin.api.types

## Class ProvidedClassifier

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

-     public class ProvidedClassifier
      extends Object

  Determines what `Class` types an `AnnotatedElement` provides. Built in support for the `Provides` annotation
  Since:
    19.3.0
  Author:
    cdivilly

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ProvidedClassifier` | `instance()`
    `Set<TypeQualifier<?>>` | `provides(AnnotatedElement element)` Determines the services that the specified annotation site provides
    `Set<TypeQualifier<?>>` | `provides(AnnotationSet annotations)` Determines the services that the specified AnnotationSet provides.
    `Set<TypeQualifier<?>>` | `provides(Class<?> type)` Determines the services that the specified type provides.
    `Set<TypeQualifier<?>>` | `provides(Field field)` Determines the services a constant field provides

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### provides

          public Set<TypeQualifier<?>> provides(AnnotatedElement element)

      Determines the services that the specified annotation site provides
      Parameters:
        `element` - The annotation site to examine
      Returns:
        Set of `TypeQualifier` instances indicating the services the annotation site provides

    - #### provides

          public Set<TypeQualifier<?>> provides(AnnotationSet annotations)

      Determines the services that the specified AnnotationSet provides. These can be either be explicitly enumerated via `Provides.value()` or inferred as follows:

      ### AnnotationSet for a Type

      - In the first instance all interfaces explicitly implemented by the type are assumed to be the provided services
      - In the second instance iff the immediate super class is abstract then that superclass is assumed to be the provided service
      - In the third instance the actual type is assumed to be the service, i.e. the type provides itself as a service

      ### AnnotationSet for a Field

      - The declared type of the field
      Parameters:
        `annotations` - The `AnnotationSet` to be examined
      Returns:
        Set of `TypeQualifier` instances indicating the services the type provides

    - #### provides

          public Set<TypeQualifier<?>> provides(Class<?> type)

      Determines the services that the specified type provides. These can be either be explicitly enumerated via `Provides.value()` or inferred as follows:
      - In the first instance all interfaces explicitly implemented by the type are assumed to be the provided services
      - In the second instance iff the immediate super class is abstract then that superclass is assumed to be the provided service
      - In the third instance the actual type is assumed to be the service, i.e. the type provides itself as a service
      Parameters:
        `type` - The type to be examined
      Returns:
        Set of `TypeQualifier` instances indicating the services the type provides

    - #### provides

          public Set<TypeQualifier<?>> provides(Field field)
                                         throws IllegalArgumentException

      Determines the services a constant field provides
      Parameters:
        `field` - The field to be examined, must be a `static final` field
      Returns:
        Set of `TypeQualifier` instances indicating the services the field provides
      Throws:
        `IllegalArgumentException` - if the field is not a `static final` field

    - #### instance

          public static ProvidedClassifier instance()

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