Annotation Interface DefaultValueCalculator
For calculating its initial value.
Applies to properties and references.
With @DefaultValueCalculator you can associate logic to a
property or reference.
This calculator is for calculating its initial value.
For example:
@DefaultValueCalculator(CurrentYearCalculator.class) private int year;In this case when the user tries to create a new Invoice (for example) he will find that the year field already has a value, that he can change if he wants to do.
- Author:
- Javier Paniza
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionInject values to the properties of the calculator before calculating.
-
Element Details
-
value
Class valueClass with the logic for calculating the initial value, must implements ICalculator. -
properties
PropertyValue[] propertiesInject values to the properties of the calculator before calculating.- Default:
{}
-