Package com.squareup.javapoet
Class WildcardTypeName
java.lang.Object
com.squareup.javapoet.TypeName
com.squareup.javapoet.WildcardTypeName
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
WildcardTypeName
(List<TypeName> upperBounds, List<TypeName> lowerBounds) private
WildcardTypeName
(List<TypeName> upperBounds, List<TypeName> lowerBounds, List<AnnotationSpec> annotations) -
Method Summary
Modifier and TypeMethodDescriptionannotated
(List<AnnotationSpec> annotations) (package private) CodeWriter
emit
(CodeWriter out) static TypeName
get
(WildcardType wildcardName) (package private) static TypeName
get
(WildcardType wildcardName, Map<Type, TypeVariableName> map) static TypeName
get
(WildcardType mirror) (package private) static TypeName
get
(WildcardType mirror, Map<TypeParameterElement, TypeVariableName> typeVariables) static WildcardTypeName
Returns a type that represents an unknown type that extendsbound
.static WildcardTypeName
static WildcardTypeName
supertypeOf
(TypeName lowerBound) Returns a type that represents an unknown supertype ofbound
.static WildcardTypeName
supertypeOf
(Type lowerBound) Methods inherited from class com.squareup.javapoet.TypeName
annotated, arrayComponent, box, concatAnnotations, emitAnnotations, equals, get, get, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, list, list, toString, unbox
-
Field Details
-
upperBounds
-
lowerBounds
-
-
Constructor Details
-
WildcardTypeName
-
WildcardTypeName
-
-
Method Details
-
annotated
-
withoutAnnotations
- Overrides:
withoutAnnotations
in classTypeName
-
emit
- Overrides:
emit
in classTypeName
- Throws:
IOException
-
subtypeOf
Returns a type that represents an unknown type that extendsbound
. For example, ifbound
isCharSequence.class
, this returns? extends CharSequence
. Ifbound
isObject.class
, this returns?
, which is shorthand for? extends Object
. -
subtypeOf
-
supertypeOf
Returns a type that represents an unknown supertype ofbound
. For example, ifbound
isString.class
, this returns? super String
. -
supertypeOf
-
get
-
get
-
get
-
get
-