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

io.datakernel.di.annotation.Optional 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.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