All Downloads are FREE. Search and download functionalities are using the official Maven repository.

arez.annotations.PostConstruct Maven / Gradle / Ivy

There is a newer version: 0.213
Show newest version
package arez.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

/**
 * Annotation to identify method that is invoked after the component is constructed.
 * The method is invoked after the component classes constructor has been invoked and all
 * the Arez elements have been constructed and scheduled but before the scheduler has been
 * triggered. Thus this method is invoked before the first execution of any observers or
 * {@link Memoize#keepAlive()} computable values.
 *
 * 

If there are multiple methods annotated with this annotation then the methods declared in parent * classes will be invoked first and multiple methods within a single class will be invoked in declaration * order.

* *

The method that is annotated with this annotation must comply with the additional constraints:

*
    *
  • Must not be annotated with any other arez annotation except {@link Action}
  • *
  • Must have 0 parameters
  • *
  • Must not return a value
  • *
  • Must not be private
  • *
  • Must not be static
  • *
  • Must not be abstract
  • *
  • Must not throw exceptions
  • *
  • Must be accessible to the class annotated by the {@link ArezComponent} annotation.
  • *
  • * Should not be public as not expected to be invoked outside the component. A warning will be generated but can * be suppressed by the {@link SuppressWarnings} or {@link SuppressArezWarnings} annotations with a key * "Arez:PublicLifecycleMethod". This warning is also suppressed by the annotation processor if it is implementing * an interface method. *
  • *
  • * Should not be protected if in the class annotated with the {@link ArezComponent} annotation as the method is not * expected to be invoked outside the component. A warning will be generated but can be suppressed by the * {@link SuppressWarnings} or {@link SuppressArezWarnings} annotations with a key "Arez:ProtectedMethod". *
  • *
*/ @Documented @Target( ElementType.METHOD ) public @interface PostConstruct { }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy