Package javassist.bytecode
Class SignatureAttribute.TypeArgument
java.lang.Object
javassist.bytecode.SignatureAttribute.TypeArgument
- Enclosing class:
SignatureAttribute
Type argument.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) SignatureAttribute.ObjectType
(package private) char
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aTypeArgument
representing<?>
.Constructs aTypeArgument
.TypeArgument
(SignatureAttribute.ObjectType a, char w) -
Method Summary
Modifier and TypeMethodDescription(package private) static void
encode
(StringBuilder sb, SignatureAttribute.TypeArgument[] args) char
getKind()
Returns the kind of this type argument.getType()
Returns the type represented by this argument if the argument is not a wildcard type.boolean
Returns true if this type argument is a wildcard type such as?
,? extends String
, or? super Integer
.A factory method constructing aTypeArgument
with an upper bound.A factory method constructing aTypeArgument
with an lower bound.toString()
Returns the string representation.
-
Field Details
-
arg
-
wildcard
char wildcard
-
-
Constructor Details
-
TypeArgument
TypeArgument(SignatureAttribute.ObjectType a, char w) -
TypeArgument
Constructs aTypeArgument
. A type argument is<String>
,<int[]>
, or a type variable<T>
, etc.- Parameters:
t
- a class type, an array type, or a type variable.
-
TypeArgument
public TypeArgument()Constructs aTypeArgument
representing<?>
.
-
-
Method Details
-
subclassOf
A factory method constructing aTypeArgument
with an upper bound. It represents<? extends ... >
- Parameters:
t
- an upper bound type.
-
superOf
A factory method constructing aTypeArgument
with an lower bound. It represents<? super ... >
- Parameters:
t
- an lower bbound type.
-
getKind
public char getKind()Returns the kind of this type argument.- Returns:
' '
(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
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
Returns the string representation. -
encode
-