java.lang.Object
io.helidon.common.types.DefaultTypeName.Builder
- All Implemented Interfaces:
Builder<DefaultTypeName.Builder,,DefaultTypeName> Supplier<DefaultTypeName>
- Enclosing class:
DefaultTypeName
public static class DefaultTypeName.Builder
extends Object
implements Builder<DefaultTypeName.Builder,DefaultTypeName>
The fluent builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarray(boolean val) Sets the array flag for this type.build()Builds the instance.Set the simple class name.protected DefaultTypeName.BuilderCopy from an existing typeName.generic(boolean val) Sets the generic flag for this type.packageName(String val) Set the package name.primitive(boolean val) Sets the primitive flag for this type.Sets the package and class name, as well as whether it is primitive or an array.typeArguments(Collection<TypeName> val) Sets the generic type arguments to the collection passed, and if not empty will set the generic flag to true.wildcard(boolean val) Sets the wildcard flag for this type, and conditionally the generic flag if the value passed is true.
-
Constructor Details
-
Builder
protected Builder()Default ctor. -
Builder
Ctor taking the typeName for initialization.- Parameters:
val- the typeName
-
-
Method Details
-
build
Builds the instance.- Specified by:
buildin interfaceBuilder<DefaultTypeName.Builder,DefaultTypeName> - Returns:
- the built instance
-
copyFrom
Copy from an existing typeName.- Parameters:
val- the typeName to copy- Returns:
- the fluent builder
-
packageName
Set the package name.- Parameters:
val- the package name- Returns:
- this fluent builder
-
className
Set the simple class name.- Parameters:
val- the simple class name- Returns:
- the fluent builder
-
type
Sets the package and class name, as well as whether it is primitive or an array.- Parameters:
classType- the class- Returns:
- the fluent builder
-
array
Sets the array flag for this type.- Parameters:
val- the array flag value- Returns:
- the fluent builder
-
primitive
Sets the primitive flag for this type.- Parameters:
val- the primitive flag value- Returns:
- the fluent builder
-
generic
Sets the generic flag for this type.- Parameters:
val- the generic flag value- Returns:
- the fluent builder
-
wildcard
Sets the wildcard flag for this type, and conditionally the generic flag if the value passed is true.- Parameters:
val- the array flag value- Returns:
- the fluent builder
-
typeArguments
Sets the generic type arguments to the collection passed, and if not empty will set the generic flag to true.- Parameters:
val- the generic type arguments- Returns:
- the fluent builder
-