public final class ArrayTypeName extends TypeName
Modifier and Type | Field and Description |
---|---|
TypeName |
componentType |
Modifier | Constructor and Description |
---|---|
private |
ArrayTypeName(TypeName componentType) |
private |
ArrayTypeName(TypeName componentType,
java.util.List<AnnotationSpec> annotations) |
Modifier and Type | Method and Description |
---|---|
ArrayTypeName |
annotated(java.util.List<AnnotationSpec> annotations) |
(package private) CodeWriter |
emit(CodeWriter out) |
static ArrayTypeName |
get(javax.lang.model.type.ArrayType mirror)
Returns an array type equivalent to
mirror . |
(package private) static ArrayTypeName |
get(javax.lang.model.type.ArrayType mirror,
java.util.Map<javax.lang.model.element.TypeParameterElement,TypeVariableName> typeVariables) |
static ArrayTypeName |
get(java.lang.reflect.GenericArrayType type)
Returns an array type equivalent to
type . |
(package private) static ArrayTypeName |
get(java.lang.reflect.GenericArrayType type,
java.util.Map<java.lang.reflect.Type,TypeVariableName> map) |
static ArrayTypeName |
of(java.lang.reflect.Type componentType)
Returns an array type whose elements are all instances of
componentType . |
static ArrayTypeName |
of(TypeName componentType)
Returns an array type whose elements are all instances of
componentType . |
TypeName |
withoutAnnotations() |
annotated, arrayComponent, box, concatAnnotations, emitAnnotations, equals, get, get, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, list, list, toString, unbox
public final TypeName componentType
private ArrayTypeName(TypeName componentType)
private ArrayTypeName(TypeName componentType, java.util.List<AnnotationSpec> annotations)
public ArrayTypeName annotated(java.util.List<AnnotationSpec> annotations)
public TypeName withoutAnnotations()
withoutAnnotations
in class TypeName
CodeWriter emit(CodeWriter out) throws java.io.IOException
public static ArrayTypeName of(TypeName componentType)
componentType
.public static ArrayTypeName of(java.lang.reflect.Type componentType)
componentType
.public static ArrayTypeName get(javax.lang.model.type.ArrayType mirror)
mirror
.static ArrayTypeName get(javax.lang.model.type.ArrayType mirror, java.util.Map<javax.lang.model.element.TypeParameterElement,TypeVariableName> typeVariables)
public static ArrayTypeName get(java.lang.reflect.GenericArrayType type)
type
.static ArrayTypeName get(java.lang.reflect.GenericArrayType type, java.util.Map<java.lang.reflect.Type,TypeVariableName> map)