Class SignatureAttribute.TypeArgument

    • Constructor Detail

      • TypeArgument

        public TypeArgument​(SignatureAttribute.ObjectType t)
        Constructs a TypeArgument. A type argument is <String>, <int[]>, or a type variable <T>, etc.
        t - a class type, an array type, or a type variable.
      • TypeArgument

        public TypeArgument()
        Constructs a TypeArgument representing <?>.
    • Method Detail

      • getKind

        public char getKind()
        Returns the kind of this type argument.
        ' ' (not-wildcard), '*' (wildcard), '+' (wildcard with upper bound), or '-' (wildcard with lower bound).
      • isWildcard

        public boolean isWildcard()
        Returns true if this type argument is a wildcard type such as ?, ? extends String, or ? super Integer.
      • getType

        public SignatureAttribute.ObjectType getType()
        Returns the type represented by this argument if the argument is not a wildcard type. Otherwise, this method returns the upper bound (if the kind is '+'), the lower bound (if the kind is '-'), or null (if the upper or lower bound is not specified).
      • toString

        public java.lang.String toString()
        Returns the string representation.
        toString in class java.lang.Object