28 lines
792 B
Java
28 lines
792 B
Java
package info.ebenoit.ebul.cmp;
|
|
|
|
|
|
import java.lang.annotation.ElementType;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.lang.annotation.Target;
|
|
|
|
|
|
|
|
/**
|
|
* This annotation indicates that a component's field or method is meant to receive the instance of another component
|
|
* (creating a dependency implicitly). If no name is specified, the component to inject will be determined based on the
|
|
* type of the field.
|
|
*
|
|
* @author <a href="mailto:ebenoit@ebenoit.info">E. Benoît</a>
|
|
*/
|
|
@Retention( RetentionPolicy.RUNTIME )
|
|
@Target( {
|
|
ElementType.FIELD , ElementType.METHOD
|
|
} )
|
|
public @interface UseComponent
|
|
{
|
|
|
|
/** The injected component's name, or blank if it is to be guessed from the field's type */
|
|
public String value( ) default "";
|
|
|
|
}
|