Top Fields Constructors Methods
com.squareup.javapoet

public final Class ArrayTypeName

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ArrayTypeName(TypeName componentType)

private
ArrayTypeName(TypeName componentType, List<AnnotationSpec> annotations)

Method Summary

Modifier and TypeMethod and Description
public ArrayTypeName
pack-priv CodeWriter
pack-priv CodeWriter
emit(CodeWriter out, boolean varargs)

private CodeWriter
emitBrackets(CodeWriter out, boolean varargs)

private CodeWriter
public static ArrayTypeName
get(ArrayType mirror)

Returns an array type equivalent to mirror.

pack-priv static ArrayTypeName
public static ArrayTypeName
get(GenericArrayType type)

Returns an array type equivalent to type.

pack-priv static ArrayTypeName
public static ArrayTypeName
of(TypeName componentType)

Returns an array type whose elements are all instances of componentType.

public static ArrayTypeName
of(Type componentType)

Returns an array type whose elements are all instances of componentType.

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

Field Detail

componentTypeback to summary
public final TypeName componentType

Constructor Detail

ArrayTypeNameback to summary
private ArrayTypeName(TypeName componentType)
ArrayTypeNameback to summary
private ArrayTypeName(TypeName componentType, List<AnnotationSpec> annotations)

Method Detail

annotatedback to summary
public ArrayTypeName 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
emitback to summary
pack-priv CodeWriter emit(CodeWriter out, boolean varargs) throws IOException
emitBracketsback to summary
private CodeWriter emitBrackets(CodeWriter out, boolean varargs) throws IOException
emitLeafTypeback to summary
private CodeWriter emitLeafType(CodeWriter out) throws IOException
getback to summary
public static ArrayTypeName get(ArrayType mirror)

Returns an array type equivalent to mirror.

getback to summary
pack-priv static ArrayTypeName get(ArrayType mirror, Map<TypeParameterElement, TypeVariableName> typeVariables)
getback to summary
public static ArrayTypeName get(GenericArrayType type)

Returns an array type equivalent to type.

getback to summary
pack-priv static ArrayTypeName get(GenericArrayType type, Map<Type, TypeVariableName> map)
ofback to summary
public static ArrayTypeName of(TypeName componentType)

Returns an array type whose elements are all instances of componentType.

ofback to summary
public static ArrayTypeName of(Type componentType)

Returns an array type whose elements are all instances of componentType.

withoutAnnotationsback to summary
public TypeName withoutAnnotations()

Overrides com.squareup.javapoet.TypeName.withoutAnnotations.

Annotations
@Override