Package ru.objectsfill.object_param
Class Fill.FillBuilder
java.lang.Object
ru.objectsfill.object_param.Fill.FillBuilder
- Enclosing class:
- Fill
The FillBuilder class provides a fluent interface for building a Fill object.
-
Constructor Summary
ConstructorsConstructorDescriptionFillBuilder(Class<?> clazz) Constructs a new FillBuilder object with the specified class.FillBuilder(T objectz) Constructs a new FillBuilder object with the specified object. -
Method Summary
Modifier and TypeMethodDescriptioncollectionSize(Integer collectionSize) Sets the collection size.excludeField(List<String> excludedFieldName) Sets the excluded field names.gen()Builds and returns the Fill object.Sets the depth limit.valueLength(Integer valueLength) Sets the value length.withGeneric(String genericName, Class<?> genericClass) Adds a generic type to the FillBuilder using a Class object.withGeneric(String genericName, Type genericType) Adds a generic type to the FillBuilder.withGeneric(Map<String, Type> genericType) Sets multiple generic types in the FillBuilder.
-
Constructor Details
-
FillBuilder
public FillBuilder(T objectz) Constructs a new FillBuilder object with the specified object.- Type Parameters:
T- The class to be created and filled.- Parameters:
objectz- The object to be filled.
-
FillBuilder
Constructs a new FillBuilder object with the specified class.- Parameters:
clazz- The class to be created and filled.
-
-
Method Details
-
collectionSize
Sets the collection size.- Parameters:
collectionSize- The collection size.- Returns:
- The FillBuilder instance.
-
valueLength
Sets the value length.- Parameters:
valueLength- The value length.- Returns:
- The FillBuilder instance.
-
withGeneric
Adds a generic type to the FillBuilder.- Parameters:
genericName- The name of the generic type.genericType- The generic type.- Returns:
- The FillBuilder instance.
-
withGeneric
Sets multiple generic types in the FillBuilder.- Parameters:
genericType- The map of generic types.- Returns:
- The FillBuilder instance.
-
withGeneric
Adds a generic type to the FillBuilder using a Class object.- Parameters:
genericName- The name of the generic type.genericClass- The generic class.- Returns:
- The FillBuilder instance.
-
excludeField
Sets the excluded field names.- Parameters:
excludedFieldName- The excluded field names.- Returns:
- The FillBuilder instance.
-
setDeep
Sets the depth limit.- Parameters:
deep- The depth limit.- Returns:
- The FillBuilder instance.
-
gen
Builds and returns the Fill object.- Returns:
- The created Fill object.
-