ebul-cmp/src/main/java/info/ebenoit/ebul/cmp/UseComponent.java
Emmanuel BENOîT 9f5fbcbf3d Component registration info - Rewrote dependency injector finder
Use the MemberFinder. Dependencies can be injected using methods.
2015-09-14 10:56:19 +02:00

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 "";
}