|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface DefaultValueCalculatorFor 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.
| Required Element Summary | |
|---|---|
java.lang.Class |
value
Class with the logic for calculating the initial value, must implements ICalculator. |
| Optional Element Summary | |
|---|---|
PropertyValue[] |
properties
Inject values to the properties of the calculator before calculating. |
| Element Detail |
|---|
public abstract java.lang.Class value
public abstract PropertyValue[] properties
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||