Package com.squareup.javapoet
Class WildcardTypeName
- java.lang.Object
-
- com.squareup.javapoet.TypeName
-
- com.squareup.javapoet.WildcardTypeName
-
public final class WildcardTypeName extends TypeName
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WildcardTypeNameannotated(List<AnnotationSpec> annotations)static TypeNameget(WildcardType wildcardName)static TypeNameget(WildcardType mirror)static WildcardTypeNamesubtypeOf(TypeName upperBound)Returns a type that represents an unknown type that extendsbound.static WildcardTypeNamesubtypeOf(Type upperBound)static WildcardTypeNamesupertypeOf(TypeName lowerBound)Returns a type that represents an unknown supertype ofbound.static WildcardTypeNamesupertypeOf(Type lowerBound)TypeNamewithoutAnnotations()-
Methods inherited from class com.squareup.javapoet.TypeName
annotated, box, concatAnnotations, equals, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, toString, unbox
-
-
-
-
Method Detail
-
annotated
public WildcardTypeName annotated(List<AnnotationSpec> annotations)
-
withoutAnnotations
public TypeName withoutAnnotations()
- Overrides:
withoutAnnotationsin classTypeName
-
subtypeOf
public static WildcardTypeName subtypeOf(TypeName upperBound)
Returns a type that represents an unknown type that extendsbound. For example, ifboundisCharSequence.class, this returns? extends CharSequence. IfboundisObject.class, this returns?, which is shorthand for? extends Object.
-
subtypeOf
public static WildcardTypeName subtypeOf(Type upperBound)
-
supertypeOf
public static WildcardTypeName supertypeOf(TypeName lowerBound)
Returns a type that represents an unknown supertype ofbound. For example, ifboundisString.class, this returns? super String.
-
supertypeOf
public static WildcardTypeName supertypeOf(Type lowerBound)
-
get
public static TypeName get(WildcardType mirror)
-
get
public static TypeName get(WildcardType wildcardName)
-
-