Uses of Class
com.squareup.javapoet.TypeName
-
Uses of TypeName in com.squareup.javapoet
Subclasses of TypeName in com.squareup.javapoetModifier and TypeClassDescriptionfinal class
final class
A fully-qualified class name for top-level and member classes.final class
final class
final class
Fields in com.squareup.javapoet declared as TypeNameModifier and TypeFieldDescriptionstatic final TypeName
TypeName.BOOLEAN
static final TypeName
TypeName.BYTE
static final TypeName
TypeName.CHAR
final TypeName
ArrayTypeName.componentType
static final TypeName
TypeName.DOUBLE
static final TypeName
TypeName.FLOAT
static final TypeName
TypeName.INT
static final TypeName
TypeName.LONG
private TypeName
MethodSpec.Builder.returnType
final TypeName
MethodSpec.returnType
static final TypeName
TypeName.SHORT
private TypeName
TypeSpec.Builder.superclass
final TypeName
TypeSpec.superclass
private final TypeName
AnnotationSpec.Builder.type
final TypeName
AnnotationSpec.type
private final TypeName
FieldSpec.Builder.type
final TypeName
FieldSpec.type
private final TypeName
ParameterSpec.Builder.type
final TypeName
ParameterSpec.type
static final TypeName
TypeName.VOID
Fields in com.squareup.javapoet with type parameters of type TypeNameModifier and TypeFieldDescriptionTypeVariableName.bounds
MethodSpec.Builder.exceptions
MethodSpec.exceptions
WildcardTypeName.lowerBounds
TypeSpec.Builder.superinterfaces
TypeSpec.superinterfaces
ParameterizedTypeName.typeArguments
WildcardTypeName.upperBounds
Methods in com.squareup.javapoet that return TypeNameModifier and TypeMethodDescriptionfinal TypeName
TypeName.annotated
(AnnotationSpec... annotations) TypeName.annotated
(List<AnnotationSpec> annotations) private TypeName
(package private) static TypeName
TypeName.arrayComponent
(TypeName type) Returns the array component oftype
, or null iftype
is not an array.TypeName.box()
Returns a boxed type if this is a primitive type (likeInteger
forint
) orvoid
.static TypeName
Returns a type name equivalent totype
.(package private) static TypeName
TypeName.get
(Type type, Map<Type, TypeVariableName> map) static TypeName
TypeName.get
(TypeMirror mirror) Returns a type name equivalent tomirror
.(package private) static TypeName
TypeName.get
(TypeMirror mirror, Map<TypeParameterElement, TypeVariableName> typeVariables) static TypeName
WildcardTypeName.get
(WildcardType wildcardName) (package private) static TypeName
WildcardTypeName.get
(WildcardType wildcardName, Map<Type, TypeVariableName> map) static TypeName
WildcardTypeName.get
(WildcardType mirror) (package private) static TypeName
WildcardTypeName.get
(WildcardType mirror, Map<TypeParameterElement, TypeVariableName> typeVariables) TypeName.unbox()
Returns an unboxed type if this is a boxed primitive type (likeint
forInteger
) orVoid
.ArrayTypeName.withoutAnnotations()
ParameterizedTypeName.withoutAnnotations()
TypeName.withoutAnnotations()
TypeVariableName.withoutAnnotations()
WildcardTypeName.withoutAnnotations()
Methods in com.squareup.javapoet that return types with arguments of type TypeNameModifier and TypeMethodDescriptionConverts an array of types to a list of type names.TypeName.list
(Type[] types, Map<Type, TypeVariableName> map) Methods in com.squareup.javapoet with parameters of type TypeNameModifier and TypeMethodDescriptionMethodSpec.Builder.addException
(TypeName exception) MethodSpec.Builder.addParameter
(TypeName type, String name, Modifier... modifiers) TypeSpec.Builder.addSuperinterface
(TypeName superinterface) (package private) static TypeName
TypeName.arrayComponent
(TypeName type) Returns the array component oftype
, or null iftype
is not an array.(package private) static ArrayTypeName
Returnstype
as an array, or null iftype
is not an array.static FieldSpec.Builder
static ParameterSpec.Builder
static ParameterizedTypeName
Returns a parameterized type, applyingtypeArguments
torawType
.static TypeVariableName
Returns type variable namedname
withbounds
.static ArrayTypeName
Returns an array type whose elements are all instances ofcomponentType
.static WildcardTypeName
Returns a type that represents an unknown type that extendsbound
.TypeSpec.Builder.superclass
(TypeName superclass) static WildcardTypeName
WildcardTypeName.supertypeOf
(TypeName lowerBound) Returns a type that represents an unknown supertype ofbound
.(package private) ParameterSpec.Builder
TypeVariableName.withBounds
(TypeName... bounds) Method parameters in com.squareup.javapoet with type arguments of type TypeNameModifier and TypeMethodDescriptionMethodSpec.Builder.addExceptions
(Iterable<? extends TypeName> exceptions) TypeSpec.Builder.addSuperinterfaces
(Iterable<? extends TypeName> superinterfaces) ParameterizedTypeName.nestedClass
(String name, List<TypeName> typeArguments) Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class, with the specifiedtypeArguments
.private static TypeVariableName
TypeVariableName.withBounds
(List<? extends TypeName> bounds) Constructors in com.squareup.javapoet with parameters of type TypeNameModifierConstructorDescriptionprivate
ArrayTypeName
(TypeName componentType) private
ArrayTypeName
(TypeName componentType, List<AnnotationSpec> annotations) private
private
private
Constructor parameters in com.squareup.javapoet with type arguments of type TypeNameModifierConstructorDescription(package private)
ParameterizedTypeName
(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments) private
ParameterizedTypeName
(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments, List<AnnotationSpec> annotations) private
TypeVariableName
(String name, List<TypeName> bounds) private
TypeVariableName
(String name, List<TypeName> bounds, List<AnnotationSpec> annotations) private
WildcardTypeName
(List<TypeName> upperBounds, List<TypeName> lowerBounds) private
WildcardTypeName
(List<TypeName> upperBounds, List<TypeName> lowerBounds, List<AnnotationSpec> annotations)