Class TypeBase

    • Method Detail

      • toCanonical

        public java.lang.String toCanonical()
        Description copied from class: ResolvedType
        Method that can be used to serialize type into form from which it can be fully deserialized from at a later point (using TypeFactory from mapper package). For simple types this is same as calling Class.getName(), but for structured types it may additionally contain type information about contents.
        Specified by:
        toCanonical in class ResolvedType
        Returns:
        String representation of the fully resolved type
      • getGenericSignature

        public abstract java.lang.StringBuilder getGenericSignature​(java.lang.StringBuilder sb)
        Specified by:
        getGenericSignature in class JavaType
        Parameters:
        sb - StringBuilder to append signature to
        Returns:
        StringBuilder that was passed in; returned to allow call chaining
      • getErasedSignature

        public abstract java.lang.StringBuilder getErasedSignature​(java.lang.StringBuilder sb)
        Description copied from class: JavaType
        Method for accessing signature without generic type information, in form compatible with all versions of JVM, and specifically used for type descriptions when generating byte code.
        Specified by:
        getErasedSignature in class JavaType
        Parameters:
        sb - StringBuilder to append signature to
        Returns:
        StringBuilder that was passed in; returned to allow call chaining
      • containedTypeCount

        public int containedTypeCount()
        Description copied from class: ResolvedType
        Method for checking how many contained types this type has. Contained types are usually generic types, so that generic Maps have 2 contained types.
        Specified by:
        containedTypeCount in class JavaType
        Returns:
        Number of contained types that may be accessed
      • containedType

        public JavaType containedType​(int index)
        Description copied from class: ResolvedType
        Method for accessing definitions of contained ("child") types.
        Specified by:
        containedType in class JavaType
        Parameters:
        index - Index of contained type to return
        Returns:
        Contained type at index, or null if no such type exists (no exception thrown)
      • containedTypeName

        @Deprecated
        public java.lang.String containedTypeName​(int index)
        Deprecated.
        Description copied from class: ResolvedType
        Method for accessing name of type variable in indicated position. If no name is bound, will use placeholders (derived from 0-based index); if no type variable or argument exists with given index, null is returned.
        Specified by:
        containedTypeName in class JavaType
        Parameters:
        index - Index of contained type to return
        Returns:
        Contained type at index, or null if no such type exists (no exception thrown)
      • getSuperClass

        public JavaType getSuperClass()
        Description copied from class: JavaType
        Accessor for finding fully resolved parent class of this type, if it has one; null if not.
        Specified by:
        getSuperClass in class JavaType
      • getInterfaces

        public java.util.List<JavaType> getInterfaces()
        Description copied from class: JavaType
        Accessor for finding fully resolved interfaces this type implements, if any; empty array if none.
        Specified by:
        getInterfaces in class JavaType
      • findSuperType

        public final JavaType findSuperType​(java.lang.Class<?> rawTarget)
        Description copied from class: JavaType
        Method that may be called to find representation of given type within type hierarchy of this type: either this type (if this type has given erased type), one of its supertypes that has the erased types, or null if target is neither this type or any of its supertypes.
        Specified by:
        findSuperType in class JavaType
      • findTypeParameters

        public JavaType[] findTypeParameters​(java.lang.Class<?> expType)
        Description copied from class: JavaType
        Method that may be used to find paramaterization this type has for given type-erased generic target type.
        Specified by:
        findTypeParameters in class JavaType