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 Details

    • 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()