Top Fields Constructors Methods
com.squareup.javapoet

public final Class WildcardTypeName

extends TypeName
Class Inheritance
Imports
java.io.IOException, java.lang.reflect.Type, .WildcardType, java.util.ArrayList, .Collections, .LinkedHashMap, .List, .Map, javax.lang.model.element.TypeParameterElement, javax.lang.model.type.TypeMirror

Field Summary

Modifier and TypeField and Description
public final List<TypeName>
public final List<TypeName>
Inherited from com.squareup.javapoet.TypeName:
annotationsBOOLEANBYTECHARDOUBLEFLOATINTLONGOBJECTSHORTVOID

Constructor Summary

AccessConstructor and Description
private
WildcardTypeName(List<TypeName> upperBounds, List<TypeName> lowerBounds)

private
WildcardTypeName(List<TypeName> upperBounds, List<TypeName> lowerBounds, List<AnnotationSpec> annotations)

Method Summary

Modifier and TypeMethod and Description
public WildcardTypeName
pack-priv CodeWriter
public static TypeName
get(WildcardType mirror)

pack-priv static TypeName
public static TypeName
get(WildcardType wildcardName)

pack-priv static TypeName
get(WildcardType wildcardName, Map<Type, TypeVariableName> map)

public static WildcardTypeName
subtypeOf(TypeName upperBound)

Returns a type that represents an unknown type that extends bound.

public static WildcardTypeName
subtypeOf(Type upperBound)

public static WildcardTypeName
supertypeOf(TypeName lowerBound)

Returns a type that represents an unknown supertype of bound.

public static WildcardTypeName
supertypeOf(Type lowerBound)

public TypeName
Inherited from com.squareup.javapoet.TypeName:
annotatedarrayComponentasArrayboxconcatAnnotationsemitAnnotationsequalsgetgetgetgethashCodeisAnnotatedisBoxedPrimitiveisPrimitivelistlisttoStringunbox

Field Detail

lowerBoundsback to summary
public final List<TypeName> lowerBounds
upperBoundsback to summary
public final List<TypeName> upperBounds

Constructor Detail

WildcardTypeNameback to summary
private WildcardTypeName(List<TypeName> upperBounds, List<TypeName> lowerBounds)
WildcardTypeNameback to summary
private WildcardTypeName(List<TypeName> upperBounds, List<TypeName> lowerBounds, List<AnnotationSpec> annotations)

Method Detail

annotatedback to summary
public WildcardTypeName annotated(List<AnnotationSpec> annotations)

Overrides com.squareup.javapoet.TypeName.annotated.

Annotations
@Override
emitback to summary
pack-priv CodeWriter emit(CodeWriter out) throws IOException

Overrides com.squareup.javapoet.TypeName.emit.

Annotations
@Override
getback to summary
public static TypeName get(WildcardType mirror)
getback to summary
pack-priv static TypeName get(WildcardType mirror, Map<TypeParameterElement, TypeVariableName> typeVariables)
getback to summary
public static TypeName get(WildcardType wildcardName)
getback to summary
pack-priv static TypeName get(WildcardType wildcardName, Map<Type, TypeVariableName> map)
subtypeOfback to summary
public static WildcardTypeName subtypeOf(TypeName upperBound)

Returns a type that represents an unknown type that extends 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.

subtypeOfback to summary
public static WildcardTypeName subtypeOf(Type upperBound)
supertypeOfback to summary
public static WildcardTypeName supertypeOf(TypeName lowerBound)

Returns a type that represents an unknown supertype of bound. For example, if bound is String.class, this returns ? super String.

supertypeOfback to summary
public static WildcardTypeName supertypeOf(Type lowerBound)
withoutAnnotationsback to summary
public TypeName withoutAnnotations()

Overrides com.squareup.javapoet.TypeName.withoutAnnotations.

Annotations
@Override