@Override public TypeName withoutAnnotations() { return new WildcardTypeName(upperBounds, lowerBounds); }
/** * Returns a type that represents an unknown type that extends {@code bound}. For example, if * {@code bound} is {@code CharSequence.class}, this returns {@code ? extends CharSequence}. If * {@code bound} is {@code Object.class}, this returns {@code ?}, which is shorthand for {@code * ? extends Object}. */ public static WildcardTypeName subtypeOf(TypeName upperBound) { return new WildcardTypeName(Collections.singletonList(upperBound), Collections.emptyList()); }
/** * Returns a type that represents an unknown supertype of {@code bound}. For example, if {@code * bound} is {@code String.class}, this returns {@code ? super String}. */ public static WildcardTypeName supertypeOf(TypeName lowerBound) { return new WildcardTypeName(Collections.singletonList(OBJECT), Collections.singletonList(lowerBound)); }
@Override public WildcardTypeName annotated(List<AnnotationSpec> annotations) { return new WildcardTypeName(upperBounds, lowerBounds, concatAnnotations(annotations)); }
static TypeName get(WildcardType wildcardName, Map<Type, TypeVariableName> map) { return new WildcardTypeName( list(wildcardName.getUpperBounds(), map), list(wildcardName.getLowerBounds(), map)); } }
@Override public TypeName withoutAnnotations() { return new WildcardTypeName(upperBounds, lowerBounds); }
@Override public TypeName withoutAnnotations() { return new WildcardTypeName(upperBounds, lowerBounds); }
/** * Returns a type that represents an unknown supertype of {@code bound}. For example, if {@code * bound} is {@code String.class}, this returns {@code ? super String}. */ public static WildcardTypeName supertypeOf(TypeName lowerBound) { return new WildcardTypeName(Arrays.<TypeName>asList(OBJECT), Arrays.asList(lowerBound)); }
/** * Returns a type that represents an unknown type that extends {@code bound}. For example, if * {@code bound} is {@code CharSequence.class}, this returns {@code ? extends CharSequence}. If * {@code bound} is {@code Object.class}, this returns {@code ?}, which is shorthand for {@code * ? extends Object}. */ public static WildcardTypeName subtypeOf(TypeName upperBound) { return new WildcardTypeName(Arrays.asList(upperBound), Collections.<TypeName>emptyList()); }
/** * Returns a type that represents an unknown type that extends {@code bound}. For example, if * {@code bound} is {@code CharSequence.class}, this returns {@code ? extends CharSequence}. If * {@code bound} is {@code Object.class}, this returns {@code ?}, which is shorthand for {@code * ? extends Object}. */ public static WildcardTypeName subtypeOf(TypeName upperBound) { return new WildcardTypeName(Arrays.asList(upperBound), Collections.<TypeName>emptyList()); }
/** * Returns a type that represents an unknown supertype of {@code bound}. For example, if {@code * bound} is {@code String.class}, this returns {@code ? super String}. */ public static WildcardTypeName supertypeOf(TypeName lowerBound) { return new WildcardTypeName(Arrays.<TypeName>asList(OBJECT), Arrays.asList(lowerBound)); }
@Override public WildcardTypeName annotated(List<AnnotationSpec> annotations) { return new WildcardTypeName(upperBounds, lowerBounds, concatAnnotations(annotations)); }
@Override public WildcardTypeName annotated(List<AnnotationSpec> annotations) { return new WildcardTypeName(upperBounds, lowerBounds, concatAnnotations(annotations)); }
static TypeName get(WildcardType wildcardName, Map<Type, TypeVariableName> map) { return new WildcardTypeName( list(wildcardName.getUpperBounds(), map), list(wildcardName.getLowerBounds(), map)); } }
static TypeName get(WildcardType wildcardName, Map<Type, TypeVariableName> map) { return new WildcardTypeName( list(wildcardName.getUpperBounds(), map), list(wildcardName.getLowerBounds(), map)); } }