public final class WildcardTypeName extends TypeName
| Modifier and Type | Field and Description |
|---|---|
List<TypeName> |
lowerBounds |
List<TypeName> |
upperBounds |
| Modifier and Type | Method and Description |
|---|---|
WildcardTypeName |
annotated(List<AnnotationSpec> annotations) |
static TypeName |
get(WildcardType mirror) |
static TypeName |
get(WildcardType wildcardName) |
static WildcardTypeName |
subtypeOf(Type upperBound) |
static WildcardTypeName |
subtypeOf(TypeName upperBound)
Returns a type that represents an unknown type that extends
bound. |
static WildcardTypeName |
supertypeOf(Type lowerBound) |
static WildcardTypeName |
supertypeOf(TypeName lowerBound)
Returns a type that represents an unknown supertype of
bound. |
public WildcardTypeName annotated(List<AnnotationSpec> annotations)
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 © 2016 Square, Inc.. All Rights Reserved.