Annotation Interface Initialize


@Retention(RUNTIME) @Target(METHOD) public @interface Initialize
An initialization method is a method that is invoked after all Components are instantiated. It is only recognised if its declaring class is a component. This is especially useful when you must have cyclic dependencies. The initialization method may have parameters which are treated as dependencies. A class may have multiple initialization methods, and the order of all initialization methods can be determined by setting value(), where lower values mean earlier invocation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Used for determining the invocation order of all initialization methods.
  • Element Details

    • value

      int value
      Used for determining the invocation order of all initialization methods. Lower number means earlier invocation.
      Returns:
      int used for ordering initialization methods
      Default:
      0