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

com.google.inject.assistedinject.Assisted Maven / Gradle / Ivy

package com.google.inject.assistedinject;

import com.google.inject.BindingAnnotation;

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

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Annotates an injected parameter or field whose value comes from an argument to a factory method.
 */
@BindingAnnotation
@Target({FIELD, PARAMETER, METHOD})
@Retention(RUNTIME)
public @interface Assisted {

    /**
     * The unique name for this parameter. This is matched to the {@literal @Assisted} constructor
     * parameter with the same value. Names are not necessary when the parameter types are distinct.
     */
    String value() default "";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy