public final class WildcardTypeName extends TypeName
Modifier and Type | Field and Description |
---|---|
List<TypeName> |
lowerBounds |
List<TypeName> |
upperBounds |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static TypeName |
get(WildcardType mirror) |
static TypeName |
get(WildcardType wildcardName) |
int |
hashCode() |
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 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 © 2015 Square, Inc.. All Rights Reserved.