io.datakernel.di.annotation.Optional 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 java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* This annotation is used along with {@link Provides provider method} DSL and {@link Inject injection} DSL
* for marking binding dependencies as optional.
*
* The values of {@link Inject inject fields} will be not touched and parameters of {@link Provides provider methods}
* are set to null.
*/
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
public @interface Optional {
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy