Class TypeVariableToken

    • Constructor Detail

      • TypeVariableToken

        public TypeVariableToken​(String symbol,
                                 List<? extends TypeDescription.Generic> bounds)
        Creates a new type variable token without annotations.
        Parameters:
        symbol - The type variable's symbol.
        bounds - The type variable's upper bounds.
      • TypeVariableToken

        public TypeVariableToken​(String symbol,
                                 List<? extends TypeDescription.Generic> bounds,
                                 List<? extends AnnotationDescription> annotations)
        Creates a new type variable token.
        Parameters:
        symbol - The type variable's symbol.
        bounds - The type variable's upper bounds.
        annotations - The annotations of the type variable.
    • Method Detail

      • of

        public static TypeVariableToken of​(TypeDescription.Generic typeVariable,
                                           ElementMatcher<? super TypeDescription> matcher)
        Transforms a type variable into a type variable token with its bounds detached.
        Parameters:
        typeVariable - A type variable in its attached state.
        matcher - A matcher that identifies types to detach from the upper bound types.
        Returns:
        A token representing the detached type variable.
      • getSymbol

        public String getSymbol()
        Returns the type variable's symbol.
        Returns:
        The type variable's symbol.
      • getBounds

        public TypeList.Generic getBounds()
        Returns the type variable's upper bounds.
        Returns:
        The type variable's upper bounds.
      • getAnnotations

        public AnnotationList getAnnotations()
        Returns the annotations on this type variable.
        Returns:
        The annotations on this variable.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object