Target: Method of a POJO annotated with @StageDefinition or @ApplicationDefinition.
Description: Marks the annotated method as the stage's or applications's initializations method.
In stages this method runs before each stage execution. For applications it it executed only once, in DIF startup time.
Remarks: There are several signatures allowed for the annotated method, namely boolean return. The stage only executes if the return of the method is True. See the examples for a comprehensive description.
JavaDoc: Click here
Attributes: N/A
Examples:
public class aStage // Void return, no arguments @Init void initMethod() { // do something... } ... } public class aStage // Void return, IDIFContext argument @Init void initMethod(IDIFContext ctx) { // do something... } ... } public class aStage // boolean return, IDIFContext argument @Init boolean initMethod(IDIFContext ctx) { return true; } ... } public class aStage // boolean return, no arguments @Init boolean initMethod() { return true; } ... }
See also: