Class ArrayTypeName


  • public final class ArrayTypeName
    extends TypeName
    • 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

      • 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 of componentType.
      • of

        public static ArrayTypeName of​(java.lang.reflect.Type componentType)
        Returns an array type whose elements are all instances of componentType.
      • get

        public static ArrayTypeName get​(javax.lang.model.type.ArrayType mirror)
        Returns an array type equivalent to mirror.
      • 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 to type.