public final class WildcardTypeName extends TypeName
Modifier and Type | Field | Description |
---|---|---|
List<TypeName> |
lowerBounds |
|
List<TypeName> |
upperBounds |
Modifier and Type | Method | Description |
---|---|---|
WildcardTypeName |
annotated(List<AnnotationSpec> annotations) |
|
static TypeName |
get(WildcardType wildcardName) |
|
static TypeName |
get(WildcardType mirror) |
|
static WildcardTypeName |
subtypeOf(TypeName upperBound) |
Returns a type that represents an unknown type that extends
bound . |
static WildcardTypeName |
subtypeOf(Type upperBound) |
|
static WildcardTypeName |
supertypeOf(TypeName lowerBound) |
Returns a type that represents an unknown supertype of
bound . |
static WildcardTypeName |
supertypeOf(Type lowerBound) |
|
TypeName |
withoutAnnotations() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
annotated, box, concatAnnotations, equals, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, toString, unbox
public WildcardTypeName annotated(List<AnnotationSpec> annotations)
public TypeName withoutAnnotations()
withoutAnnotations
in class TypeName
public static WildcardTypeName subtypeOf(TypeName upperBound)
bound
. For example, if
bound
is CharSequence.class
, this returns ? extends CharSequence
. If
bound
is Object.class
, this returns ?
, which is shorthand for
? extends Object
.public static WildcardTypeName subtypeOf(Type upperBound)
public static WildcardTypeName supertypeOf(TypeName lowerBound)
bound
. For example, if
bound
is String.class
, this returns ? super String
.public static WildcardTypeName supertypeOf(Type lowerBound)
public static TypeName get(WildcardType mirror)
public static TypeName get(WildcardType wildcardName)
Copyright © 2019 Square, Inc.. All rights reserved.