Modification
OBJECTO
Objecto provides a powerful mechanism to customize and adapt generated objects based on specific requirements or scenarios. This flexibility enables developers to tailor objects to their exact needs, ensuring that the generated data aligns with the desired context. Objecto supports the modification of generated objects through both parameters of factory methods and modifier methods.
@Modifier
Modifier Parameters
Specify modification parameters using @Modifier
annotation in factory methods to alter specific fields or invoke methods during generation.
Declaration Example:
Usage Examples
Modifier Methods
Define @Modifier
methods with a return type of the factory interface itself.
Declaration Examples
Usage Examples
Complex Modifiers
Modifiers can also be complex, allowing modification of nested fields or collections.
Examples:
Last updated