Package com.squareup.javapoet
Class ArrayTypeName
- java.lang.Object
-
- com.squareup.javapoet.TypeName
-
- com.squareup.javapoet.ArrayTypeName
-
public final class ArrayTypeName extends TypeName
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ArrayTypeName(TypeName componentType)
private
ArrayTypeName(TypeName componentType, java.util.List<AnnotationSpec> annotations)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayTypeName
annotated(java.util.List<AnnotationSpec> annotations)
(package private) CodeWriter
emit(CodeWriter out)
static ArrayTypeName
get(java.lang.reflect.GenericArrayType type)
Returns an array type equivalent totype
.(package private) static ArrayTypeName
get(java.lang.reflect.GenericArrayType type, java.util.Map<java.lang.reflect.Type,TypeVariableName> map)
static ArrayTypeName
get(javax.lang.model.type.ArrayType mirror)
Returns an array type equivalent tomirror
.(package private) static ArrayTypeName
get(javax.lang.model.type.ArrayType mirror, java.util.Map<javax.lang.model.element.TypeParameterElement,TypeVariableName> typeVariables)
static ArrayTypeName
of(TypeName componentType)
Returns an array type whose elements are all instances ofcomponentType
.static ArrayTypeName
of(java.lang.reflect.Type componentType)
Returns an array type whose elements are all instances ofcomponentType
.TypeName
withoutAnnotations()
-
Methods inherited from class com.squareup.javapoet.TypeName
annotated, arrayComponent, box, concatAnnotations, emitAnnotations, equals, get, get, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, list, list, toString, unbox
-
-
-
-
Field Detail
-
componentType
public final TypeName componentType
-
-
Constructor Detail
-
ArrayTypeName
private ArrayTypeName(TypeName componentType)
-
ArrayTypeName
private ArrayTypeName(TypeName componentType, java.util.List<AnnotationSpec> annotations)
-
-
Method Detail
-
annotated
public ArrayTypeName annotated(java.util.List<AnnotationSpec> annotations)
-
withoutAnnotations
public TypeName withoutAnnotations()
- Overrides:
withoutAnnotations
in classTypeName
-
emit
CodeWriter emit(CodeWriter out) throws java.io.IOException
-
of
public static ArrayTypeName of(TypeName componentType)
Returns an array type whose elements are all instances ofcomponentType
.
-
of
public static ArrayTypeName of(java.lang.reflect.Type componentType)
Returns an array type whose elements are all instances ofcomponentType
.
-
get
public static ArrayTypeName get(javax.lang.model.type.ArrayType mirror)
Returns an array type equivalent tomirror
.
-
get
static ArrayTypeName get(javax.lang.model.type.ArrayType mirror, java.util.Map<javax.lang.model.element.TypeParameterElement,TypeVariableName> typeVariables)
-
get
public static ArrayTypeName get(java.lang.reflect.GenericArrayType type)
Returns an array type equivalent totype
.
-
get
static ArrayTypeName get(java.lang.reflect.GenericArrayType type, java.util.Map<java.lang.reflect.Type,TypeVariableName> map)
-
-