Uses of Class
com.squareup.javapoet.TypeName
-
-
Uses of TypeName in com.squareup.javapoet
Subclasses of TypeName in com.squareup.javapoet Modifier and Type Class Description class
ArrayTypeName
class
ClassName
A fully-qualified class name for top-level and member classes.class
ParameterizedTypeName
class
TypeVariableName
class
WildcardTypeName
Fields in com.squareup.javapoet declared as TypeName Modifier and Type Field Description static TypeName
TypeName. BOOLEAN
static TypeName
TypeName. BYTE
static TypeName
TypeName. CHAR
TypeName
ArrayTypeName. componentType
static TypeName
TypeName. DOUBLE
static TypeName
TypeName. FLOAT
static TypeName
TypeName. INT
static TypeName
TypeName. LONG
TypeName
MethodSpec. returnType
static TypeName
TypeName. SHORT
TypeName
TypeSpec. superclass
TypeName
AnnotationSpec. type
TypeName
FieldSpec. type
TypeName
ParameterSpec. type
static TypeName
TypeName. VOID
Fields in com.squareup.javapoet with type parameters of type TypeName Modifier and Type Field Description List<TypeName>
TypeVariableName. bounds
List<TypeName>
MethodSpec. exceptions
List<TypeName>
WildcardTypeName. lowerBounds
List<TypeName>
TypeSpec. superinterfaces
List<TypeName>
ParameterizedTypeName. typeArguments
List<TypeName>
WildcardTypeName. upperBounds
Methods in com.squareup.javapoet that return TypeName Modifier and Type Method Description TypeName
TypeName. annotated(AnnotationSpec... annotations)
TypeName
TypeName. annotated(List<AnnotationSpec> annotations)
TypeName
TypeName. box()
Returns a boxed type if this is a primitive type (likeInteger
forint
) orvoid
.static TypeName
TypeName. get(Type type)
Returns a type name equivalent totype
.static TypeName
TypeName. get(TypeMirror mirror)
Returns a type name equivalent tomirror
.static TypeName
WildcardTypeName. get(WildcardType wildcardName)
static TypeName
WildcardTypeName. get(WildcardType mirror)
TypeName
TypeName. unbox()
Returns an unboxed type if this is a boxed primitive type (likeint
forInteger
) orVoid
.TypeName
ArrayTypeName. withoutAnnotations()
TypeName
ClassName. withoutAnnotations()
TypeName
ParameterizedTypeName. withoutAnnotations()
TypeName
TypeName. withoutAnnotations()
TypeName
TypeVariableName. withoutAnnotations()
TypeName
WildcardTypeName. withoutAnnotations()
Methods in com.squareup.javapoet with parameters of type TypeName Modifier and Type Method Description MethodSpec.Builder
MethodSpec.Builder. addException(TypeName exception)
TypeSpec.Builder
TypeSpec.Builder. addField(TypeName type, String name, Modifier... modifiers)
MethodSpec.Builder
MethodSpec.Builder. addParameter(TypeName type, String name, Modifier... modifiers)
TypeSpec.Builder
TypeSpec.Builder. addSuperinterface(TypeName superinterface)
static FieldSpec.Builder
FieldSpec. builder(TypeName type, String name, Modifier... modifiers)
static ParameterSpec.Builder
ParameterSpec. builder(TypeName type, String name, Modifier... modifiers)
static ParameterizedTypeName
ParameterizedTypeName. get(ClassName rawType, TypeName... typeArguments)
Returns a parameterized type, applyingtypeArguments
torawType
.static TypeVariableName
TypeVariableName. get(String name, TypeName... bounds)
Returns type variable namedname
withbounds
.static ArrayTypeName
ArrayTypeName. of(TypeName componentType)
Returns an array type whose elements are all instances ofcomponentType
.MethodSpec.Builder
MethodSpec.Builder. returns(TypeName returnType)
static WildcardTypeName
WildcardTypeName. subtypeOf(TypeName upperBound)
Returns a type that represents an unknown type that extendsbound
.TypeSpec.Builder
TypeSpec.Builder. superclass(TypeName superclass)
static WildcardTypeName
WildcardTypeName. supertypeOf(TypeName lowerBound)
Returns a type that represents an unknown supertype ofbound
.TypeVariableName
TypeVariableName. withBounds(TypeName... bounds)
Method parameters in com.squareup.javapoet with type arguments of type TypeName Modifier and Type Method Description MethodSpec.Builder
MethodSpec.Builder. addExceptions(Iterable<? extends TypeName> exceptions)
TypeSpec.Builder
TypeSpec.Builder. addSuperinterfaces(Iterable<? extends TypeName> superinterfaces)
ParameterizedTypeName
ParameterizedTypeName. nestedClass(String name, List<TypeName> typeArguments)
Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class, with the specifiedtypeArguments
.TypeVariableName
TypeVariableName. withBounds(List<TypeName> bounds)
-