Class TypeReflection<T>

  • Type Parameters:
    T - The Type being reflected
    All Implemented Interfaces:
    java.lang.Comparable<TypeReflection<?>>

    public class TypeReflection<T>
    extends java.lang.Object
    implements java.lang.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 Detail

      • compareTo

        public int compareTo​(TypeReflection<?> o)
        Specified by:
        compareTo in interface java.lang.Comparable<T>
      • constantFields

        public java.util.List<oracle.dbtools.plugin.api.types.TypeConstantField<?>> constantFields()
        Enumerate the static constant fields in this type if any
        Returns:
        List of TypeConstantField instances
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getAnnotation

        public <A extends java.lang.annotation.Annotation> A getAnnotation​(java.lang.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:
        java.lang.NullPointerException - if the given annotation class is null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isConcrete

        public boolean isConcrete()
        Indicates if this type can be instantiated
        Returns:
        true if the type can be instantiated, false otherwise
      • provides

        public java.util.Set<TypeQualifier<?>> provides()
        Identifies the services that this type provides
        Returns:
        Set of TypeQualifier instances identifying the services this type provides
      • scope

        public java.lang.annotation.Annotation scope()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • type

        public java.lang.Class<T> type()
        Provides the underlying type
        Returns:
        Class instance