001package io.avaje.inject; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.Retention; 005import java.lang.annotation.Target; 006 007import static java.lang.annotation.ElementType.METHOD; 008import static java.lang.annotation.RetentionPolicy.RUNTIME; 009 010/** 011 * The <code>PostConstruct</code> annotation is used on a method that needs to be executed 012 * after dependency injection is done to perform any initialization. 013 * <p> 014 * Note that we can equally use any <code>PostConstruct</code> annotation - so we can use 015 * the one from <code>javax.annotation</code>, <code>jakarta.annotation</code> or this one. 016 * </p> 017 * <p> 018 * Only one method in a given class can be annotated with this annotation. 019 * <p> 020 * The method on which the <code>PostConstruct</code> annotation is applied must fulfill 021 * the following criteria: 022 * <ul> 023 * <li>The method must not have any parameters.</li> 024 * <li>The method may be public, protected or package private.</li> 025 * <li>The method must not be static.</li> 026 * </ul> 027 */ 028@Documented 029@Retention(RUNTIME) 030@Target(METHOD) 031public @interface PostConstruct { 032}