Interface ArrayTypeBuilder


public interface ArrayTypeBuilder

An array type builder is used to build array types.

A typical usage is:


 Type arrayOfStringType = Types.arrayType().componentType(String.class).and().build();
 
Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Details

    • componentType

      TypeArgumentBuilder<ArrayTypeBuilder> componentType(Class<?> rawType)

      Specifies the component type of the array type.

      Parameters:
      rawType - an erased type
      Returns:
      a type argument builder with this builder as parent
    • componentType

      ArrayTypeBuilder componentType(Type type)

      Specifies the component type of the array type.

      Parameters:
      type - a type
      Returns:
      this builder
    • componentArrayType

      Specifies an array type as component type of the array type.

      Returns:
      an array type argument builder with this builder as parent
    • build

      Type build() throws IllegalStateException

      Builds the array type.

      Returns:
      a generic array type
      Throws:
      IllegalStateException - if the builder is not in a proper state to build a type