public final class WildcardTypeName extends TypeName
| Modifier and Type | Field and Description |
|---|---|
java.util.List<TypeName> |
lowerBounds |
java.util.List<TypeName> |
upperBounds |
| Modifier and Type | Method and Description |
|---|---|
WildcardTypeName |
annotated(java.util.List<AnnotationSpec> annotations) |
static TypeName |
get(javax.lang.model.type.WildcardType mirror) |
static TypeName |
get(java.lang.reflect.WildcardType wildcardName) |
static WildcardTypeName |
subtypeOf(java.lang.reflect.Type upperBound) |
static WildcardTypeName |
subtypeOf(TypeName upperBound)
Returns a type that represents an unknown type that extends
bound. |
static WildcardTypeName |
supertypeOf(java.lang.reflect.Type lowerBound) |
static WildcardTypeName |
supertypeOf(TypeName lowerBound)
Returns a type that represents an unknown supertype of
bound. |
TypeName |
withoutAnnotations() |
annotated, box, concatAnnotations, equals, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, toString, unboxpublic final java.util.List<TypeName> upperBounds
public final java.util.List<TypeName> lowerBounds
public WildcardTypeName annotated(java.util.List<AnnotationSpec> annotations)
public TypeName withoutAnnotations()
withoutAnnotations in class TypeNamepublic 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(java.lang.reflect.Type upperBound)
public static WildcardTypeName supertypeOf(TypeName lowerBound)
bound. For example, if bound is String.class, this returns ? super String.public static WildcardTypeName supertypeOf(java.lang.reflect.Type lowerBound)
public static TypeName get(javax.lang.model.type.WildcardType mirror)
public static TypeName get(java.lang.reflect.WildcardType wildcardName)
Copyright © 2020 Square, Inc.. All Rights Reserved.