Class Type<T>

    • Field Detail

      • DefaultBinder

        public static final Binder DefaultBinder
      • Value

        public static final Missing Value
      • EmptyTypes

        public static final Type<?>[] EmptyTypes
      • Bottom

        @Deprecated
        public static final Type<?> Bottom
        Deprecated.
        Use bottomType() instead.
      • NullType

        @Deprecated
        public static final Type<?> NullType
        Deprecated.
        Use nullType() instead.
      • EmptyObjects

        protected static final java.lang.Object[] EmptyObjects
      • EmptyStrings

        protected static final java.lang.String[] EmptyStrings
      • EmptyMethods

        protected static final MethodInfo[] EmptyMethods
      • EmptyConstructors

        protected static final ConstructorInfo[] EmptyConstructors
      • EmptyFields

        protected static final FieldInfo[] EmptyFields
      • EmptyMembers

        protected static final MemberInfo[] EmptyMembers
      • DefaultLookup

        protected static final java.util.Set<BindingFlags> DefaultLookup
      • _interfaces

        private TypeList _interfaces
      • CACHE_LOCK

        static final java.lang.Object CACHE_LOCK
      • RESOLVER

        static final Resolver RESOLVER
      • PRIMITIVE_TYPES

        static final Type<?>[] PRIMITIVE_TYPES
      • TYPE_BINDER

        static final TypeBinder TYPE_BINDER
      • FilterNameIgnoreCase

        public static final MemberFilter FilterNameIgnoreCase
      • FilterRawMember

        public static final MemberFilter FilterRawMember
      • FilterMethodOverride

        public static final MemberFilter FilterMethodOverride
    • Constructor Detail

      • Type

        protected Type()
    • Method Detail

      • bottomType

        public static Type<?> bottomType()
      • nullType

        public static Type<?> nullType()
      • unboundedWildcard

        public static WildcardType<?> unboundedWildcard()
      • isNested

        public boolean isNested()
      • isLocalClass

        public boolean isLocalClass()
      • isVisible

        public boolean isVisible()
      • isClass

        public final boolean isClass()
      • isInterface

        public final boolean isInterface()
      • isEnum

        public final boolean isEnum()
      • isAbstract

        public final boolean isAbstract()
      • isArray

        public boolean isArray()
      • isGenericType

        public boolean isGenericType()
      • isGenericTypeDefinition

        public boolean isGenericTypeDefinition()
      • isRawType

        public boolean isRawType()
      • isGenericParameter

        public boolean isGenericParameter()
      • isPrimitive

        public boolean isPrimitive()
      • hasElementType

        public boolean hasElementType()
      • getKind

        public javax.lang.model.type.TypeKind getKind()
      • getBaseType

        public Type<? super T> getBaseType()
      • getInterfaces

        public TypeList getInterfaces()
      • getExplicitInterfaces

        public TypeList getExplicitInterfaces()
      • getErasedClass

        public java.lang.Class<T> getErasedClass()
      • newInstance

        public T newInstance​(java.lang.Object... arguments)
      • getDeclaringMethod

        public MethodBase getDeclaringMethod()
      • getUnderlyingType

        @NotNull
        public final Type<?> getUnderlyingType()
      • getUnderlyingTypeCore

        @NotNull
        protected Type<?> getUnderlyingTypeCore()
      • getElementType

        public Type<?> getElementType()
      • getGenericParameterPosition

        public int getGenericParameterPosition()
      • getTypeBindings

        protected TypeBindings getTypeBindings()
      • getTypeArguments

        public TypeList getTypeArguments()
      • getGenericTypeParameters

        public TypeList getGenericTypeParameters()
      • getGenericTypeDefinition

        public Type<?> getGenericTypeDefinition()
      • containsGenericParameters

        public boolean containsGenericParameters()
      • containsGenericParameter

        public boolean containsGenericParameter​(Type<?> genericParameter)
      • isBoundedType

        public boolean isBoundedType()
      • isUnbounded

        public boolean isUnbounded()
      • hasExtendsBound

        public boolean hasExtendsBound()
      • hasSuperBound

        public boolean hasSuperBound()
      • getExtendsBound

        public Type<?> getExtendsBound()
      • getSuperBound

        public Type<?> getSuperBound()
      • isEquivalentTo

        public boolean isEquivalentTo​(Type<?> other)
      • isSubTypeOf

        public boolean isSubTypeOf​(Type<?> type)
      • isInstance

        public boolean isInstance​(java.lang.Object o)
      • implementsInterface

        public boolean implementsInterface​(Type<?> interfaceType)
      • isAssignableFrom

        public boolean isAssignableFrom​(Type<?> type)
      • getPackage

        public java.lang.Package getPackage()
      • isCompoundType

        public boolean isCompoundType()
      • isWildcardType

        public boolean isWildcardType()
      • isSynthetic

        public boolean isSynthetic()
      • accept

        public <P,​R> R accept​(TypeVisitor<P,​R> visitor,
                                    P parameter)
      • getAnnotation

        public <A extends java.lang.annotation.Annotation> A getAnnotation​(java.lang.Class<A> annotationClass)
        Specified by:
        getAnnotation in interface java.lang.reflect.AnnotatedElement
        Overrides:
        getAnnotation in class MemberInfo
      • getAnnotations

        @NotNull
        public java.lang.annotation.Annotation[] getAnnotations()
        Specified by:
        getAnnotations in interface java.lang.reflect.AnnotatedElement
        Overrides:
        getAnnotations in class MemberInfo
      • getDeclaredAnnotations

        @NotNull
        public java.lang.annotation.Annotation[] getDeclaredAnnotations()
        Specified by:
        getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElement
        Overrides:
        getDeclaredAnnotations in class MemberInfo
      • isAnnotationPresent

        public boolean isAnnotationPresent​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
        Specified by:
        isAnnotationPresent in interface java.lang.reflect.AnnotatedElement
        Overrides:
        isAnnotationPresent in class MemberInfo
      • getMember

        public final MemberList<?> getMember​(java.lang.String name)
      • getField

        public final FieldInfo getField​(java.lang.String name)
      • getField

        public FieldInfo getField​(java.lang.String name,
                                  java.util.Set<BindingFlags> bindingFlags)
      • getMethod

        public final MethodInfo getMethod​(java.lang.String name,
                                          Type<?>... parameterTypes)
      • getMethod

        public final MethodInfo getMethod​(java.lang.String name,
                                          java.util.Set<BindingFlags> bindingFlags,
                                          Type<?>... parameterTypes)
      • getMembers

        public final MemberList<?> getMembers()
      • getMembersOfType

        public final MemberList<?> getMembersOfType​(java.util.Set<MemberType> memberTypes)
      • getFields

        public final FieldList getFields()
      • getMethods

        public final MethodList getMethods()
      • getNestedTypes

        public final TypeList getNestedTypes()
      • getNestedType

        public final Type<?> getNestedType​(java.lang.String fullName)
      • getNestedType

        public Type<?> getNestedType​(java.lang.String fullName,
                                     java.util.Set<BindingFlags> bindingFlags)
      • getEnumConstants

        public java.lang.Object[] getEnumConstants()
      • getEnumNames

        public java.lang.String[] getEnumNames()
      • makeArrayType

        public final Type<T[]> makeArrayType()
      • createArrayType

        protected Type<T[]> createArrayType()
      • makeGenericType

        public final <U extends TType<U> makeGenericType​(TypeList typeArguments)
      • makeGenericType

        public final <U extends TType<U> makeGenericType​(Type<?>... typeArguments)
      • getErasedType

        public final Type<?> getErasedType()
      • makeGenericTypeCore

        protected Type<?> makeGenericTypeCore​(TypeList typeArguments)
      • getRootElementType

        Type<?> getRootElementType()
      • getMostSpecificType

        Type<?> getMostSpecificType​(Type<?> t1,
                                    Type<?> t2)
      • getName

        public java.lang.String getName()
        Specified by:
        getName in class MemberInfo
      • getClassFullName

        protected java.lang.String getClassFullName()
      • getClassSimpleName

        protected java.lang.String getClassSimpleName()
      • getShortName

        public java.lang.String getShortName()
      • getFullName

        public java.lang.String getFullName()
      • getInternalName

        public java.lang.String getInternalName()
      • getGenericSignature

        public java.lang.String getGenericSignature()
        Method that returns full generic signature of the type; suitable as signature for things like ASM package.
      • appendBriefDescription

        public java.lang.StringBuilder appendBriefDescription​(java.lang.StringBuilder sb)
        Specified by:
        appendBriefDescription in class MemberInfo
      • appendSimpleDescription

        public java.lang.StringBuilder appendSimpleDescription​(java.lang.StringBuilder sb)
        Specified by:
        appendSimpleDescription in class MemberInfo
      • appendErasedDescription

        public java.lang.StringBuilder appendErasedDescription​(java.lang.StringBuilder sb)
        Specified by:
        appendErasedDescription in class MemberInfo
      • appendDescription

        public java.lang.StringBuilder appendDescription​(java.lang.StringBuilder sb)
        Specified by:
        appendDescription in class MemberInfo
      • appendSignature

        public java.lang.StringBuilder appendSignature​(java.lang.StringBuilder sb)
        Specified by:
        appendSignature in class MemberInfo
      • appendGenericSignature

        public java.lang.StringBuilder appendGenericSignature​(java.lang.StringBuilder sb)
        Overrides:
        appendGenericSignature in class MemberInfo
      • invalidateCaches

        protected void invalidateCaches()
        Description copied from class: MemberInfo
        Invalidate any cached type/member information. This is not guaranteed to be thread-safe, should only be called when a partially constructed type/member definition changes (e.g., a TypeBuilder, MethodBuilder, etc.).
        Overrides:
        invalidateCaches in class MemberInfo
      • appendErasedSignature

        public java.lang.StringBuilder appendErasedSignature​(java.lang.StringBuilder sb)
        Specified by:
        appendErasedSignature in class MemberInfo
      • _appendClassSignature

        protected java.lang.StringBuilder _appendClassSignature​(java.lang.StringBuilder sb)
      • _appendErasedClassSignature

        protected java.lang.StringBuilder _appendErasedClassSignature​(java.lang.StringBuilder sb)
      • _appendClassDescription

        protected java.lang.StringBuilder _appendClassDescription​(java.lang.StringBuilder sb)
      • _appendClassName

        protected java.lang.StringBuilder _appendClassName​(java.lang.StringBuilder sb,
                                                           boolean fullName,
                                                           boolean dottedName)
      • of

        public static <T> Type<T> of​(java.lang.Class<T> clazz)
      • forName

        public static Type<?> forName​(java.lang.String name)
      • forName

        public static Type<?> forName​(java.lang.String name,
                                      boolean throwOnError)
      • resolveClassType

        private static Type<?> resolveClassType​(java.lang.Class<?> actualClass)
      • getType

        public static <T> Type<T> getType​(T object)
      • of

        static <T> Type<T> of​(java.lang.reflect.Type type)
      • tryFind

        static Type<?> tryFind​(java.lang.reflect.Type type)
      • makeExtendsWildcard

        public static <T> Type<? extends T> makeExtendsWildcard​(Type<T> bound)
      • makeSuperWildcard

        public static <T> Type<? super T> makeSuperWildcard​(Type<T> bound)
      • makeWildcard

        public static WildcardType<?> makeWildcard()
      • makeArrayType

        public static <T> Type<T[]> makeArrayType​(Type<T> elementType)
      • makeCompoundType

        public static Type<?> makeCompoundType​(TypeList bounds)
      • makeCompoundType

        public static Type<?> makeCompoundType​(Type<?> baseType,
                                               TypeList interfaces)
      • makeCompoundTypeCore

        private static <T> Type<T> makeCompoundTypeCore​(Type<T> baseType,
                                                        TypeList interfaces)
      • list

        public static TypeList list​(java.lang.Class<?>... classes)
      • list

        public static TypeList list​(java.util.List<? extends Type<?>> types)
      • getDeclaredConstructors

        protected ConstructorList getDeclaredConstructors()
      • getDeclaredMethods

        protected MethodList getDeclaredMethods()
      • getDeclaredFields

        protected FieldList getDeclaredFields()
      • getDeclaredTypes

        protected TypeList getDeclaredTypes()
      • getMethodBaseCandidates

        private <M extends MethodBase> M[] getMethodBaseCandidates​(MemberType type,
                                                                   java.lang.String name,
                                                                   java.util.Set<BindingFlags> bindingFlags,
                                                                   CallingConvention callingConvention,
                                                                   Type<?>[] parameterTypes,
                                                                   boolean allowPrefixLookup)
      • getFieldCandidates

        private FieldInfo[] getFieldCandidates​(java.lang.String name,
                                               java.util.Set<BindingFlags> bindingFlags,
                                               boolean allowPrefixLookup)
      • getNestedTypeCandidates

        private Type<?>[] getNestedTypeCandidates​(java.lang.String fullName,
                                                  java.util.Set<BindingFlags> bindingFlags,
                                                  boolean allowPrefixLookup)
      • filterApplyType

        private boolean filterApplyType​(Type<?> type,
                                        java.util.Set<BindingFlags> bindingFlags,
                                        java.lang.String name,
                                        boolean prefixLookup)
      • filterApplyCore

        private boolean filterApplyCore​(MemberInfo member,
                                        java.util.Set<BindingFlags> bindingFlags,
                                        boolean isPublic,
                                        boolean isPackagePrivate,
                                        boolean isStatic,
                                        java.lang.String name,
                                        boolean prefixLookup)
      • filterApplyPrefixLookup

        private boolean filterApplyPrefixLookup​(MemberInfo method,
                                                java.lang.String name,
                                                boolean ignoreCase)
      • getFilterOptions

        private static Type.FilterOptions getFilterOptions​(java.lang.String name,
                                                           java.util.Set<BindingFlags> bindingFlags,
                                                           boolean allowPrefixLookup)
      • filterPreCalculate

        static java.util.Set<BindingFlags> filterPreCalculate​(boolean isPublic,
                                                              boolean isInherited,
                                                              boolean isStatic)