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 privateArrayTypeName(TypeName componentType)privateArrayTypeName(TypeName componentType, java.util.List<AnnotationSpec> annotations)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayTypeNameannotated(java.util.List<AnnotationSpec> annotations)(package private) CodeWriteremit(CodeWriter out)(package private) CodeWriteremit(CodeWriter out, boolean varargs)private CodeWriteremitBrackets(CodeWriter out, boolean varargs)private CodeWriteremitLeafType(CodeWriter out)static ArrayTypeNameget(java.lang.reflect.GenericArrayType type)Returns an array type equivalent totype.(package private) static ArrayTypeNameget(java.lang.reflect.GenericArrayType type, java.util.Map<java.lang.reflect.Type,TypeVariableName> map)static ArrayTypeNameget(javax.lang.model.type.ArrayType mirror)Returns an array type equivalent tomirror.(package private) static ArrayTypeNameget(javax.lang.model.type.ArrayType mirror, java.util.Map<javax.lang.model.element.TypeParameterElement,TypeVariableName> typeVariables)static ArrayTypeNameof(TypeName componentType)Returns an array type whose elements are all instances ofcomponentType.static ArrayTypeNameof(java.lang.reflect.Type componentType)Returns an array type whose elements are all instances ofcomponentType.TypeNamewithoutAnnotations()-
Methods inherited from class com.squareup.javapoet.TypeName
annotated, arrayComponent, asArray, 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:
withoutAnnotationsin classTypeName
-
emit
CodeWriter emit(CodeWriter out) throws java.io.IOException
-
emit
CodeWriter emit(CodeWriter out, boolean varargs) throws java.io.IOException
- Throws:
java.io.IOException
-
emitLeafType
private CodeWriter emitLeafType(CodeWriter out) throws java.io.IOException
- Throws:
java.io.IOException
-
emitBrackets
private CodeWriter emitBrackets(CodeWriter out, boolean varargs) throws java.io.IOException
- 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)
-
-