io.datakernel.di.annotation.Transient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datakernel-di Show documentation
Show all versions of datakernel-di Show documentation
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 io.datakernel.di.core.Injector;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* A binding which is transient has no slot in object cache. That is - it works more like traditional DI's,
* creating new instances upon each {@link Injector#getInstance getInstance} call.
*
* Bindings cannot be both transient and {@link Eager eager} at the same time.
*/
@Target(METHOD)
@Retention(RUNTIME)
public @interface Transient {
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy