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

io.datakernel.di.annotation.Eager Maven / Gradle / Ivy

Go to download

DataKernel has an extremely lightweight DI with ground-breaking design principles. It supports nested scopes, singletons, object factories, modules and plugins which allow to transform graph of dependencies at startup time without any reflection.

The newest version!
package io.datakernel.di.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * A binding marked as eager would be called for an instance of its object immediately upon injector creation.
 * Next calls if {@link io.datakernel.di.core.Injector#getInstance getInstance} would only retrieve the cached instance.
 * 

* Bindings cannot be both eager and {@link Transient transient} at the same time. */ @Target({FIELD, PARAMETER, METHOD}) @Retention(RUNTIME) public @interface Eager { }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy