Enum TypeDefinition.Sort

    • Constructor Detail

      • Sort

        private Sort()
    • Method Detail

      • values

        public static TypeDefinition.Sort[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TypeDefinition.Sort c : TypeDefinition.Sort.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TypeDefinition.Sort valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • describe

        public static TypeDescription.Generic describe​(java.lang.reflect.Type type)
        Describes a loaded generic type as a TypeDescription.Generic.
        Parameters:
        type - The type to describe.
        Returns:
        A description of the provided generic type.
      • describe

        protected static TypeDescription.Generic describe​(java.lang.reflect.Type type,
                                                          TypeDescription.Generic.AnnotationReader annotationReader)
        Describes the generic type while using the supplied annotation reader for resolving type annotations if this language feature is available on the current JVM.
        Parameters:
        type - The type to describe.
        annotationReader - The annotation reader for extracting type annotations.
        Returns:
        A description of the provided generic annotated type.
      • isNonGeneric

        public boolean isNonGeneric()
        Checks if this type sort represents a non-generic type.
        Returns:
        true if this sort form represents a non-generic.
      • isParameterized

        public boolean isParameterized()
        Checks if this type sort represents a parameterized type.
        Returns:
        true if this sort form represents a parameterized type.
      • isGenericArray

        public boolean isGenericArray()
        Checks if this type sort represents a generic array.
        Returns:
        true if this type sort represents a generic array.
      • isWildcard

        public boolean isWildcard()
        Checks if this type sort represents a wildcard.
        Returns:
        true if this type sort represents a wildcard.
      • isTypeVariable

        public boolean isTypeVariable()
        Checks if this type sort represents a type variable of any form.
        Returns:
        true if this type sort represents an attached type variable.