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 Summary
Modifier and TypeMethodDescriptionbuild()
Builds the array type.Specifies an array type as component type of the array type.componentType
(Class<?> rawType) Specifies the component type of the array type.componentType
(Type type) Specifies the component type of the array type.
-
Method Details
-
componentType
Specifies the component type of the array type.
- Parameters:
rawType
- an erased type- Returns:
- a type argument builder with this builder as parent
-
componentType
Specifies the component type of the array type.
- Parameters:
type
- a type- Returns:
- this builder
-
componentArrayType
ArrayTypeArgumentBuilder<ArrayTypeBuilder> componentArrayType()Specifies an array type as component type of the array type.
- Returns:
- an array type argument builder with this builder as parent
-
build
Builds the array type.
- Returns:
- a generic array type
- Throws:
IllegalStateException
- if the builder is not in a proper state to build a type
-