import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.qi4j.api.injection.InjectionScope;
/**
* Annotation to denote the injection of a reference
* to the same Composite as the fragment is a part of.
* <p/>
* If the Composite type does not implement the type
* of the field or parameter then it will be referencing
* a private mixin.
* <p/>
* Calls to the reference will have the same semantics
* as calls to the Composite itself.
* Specifically the same set of Fragments will be invoked.
*/
@Retention( RetentionPolicy.RUNTIME )
@Target( { ElementType.FIELD, ElementType.PARAMETER } )
@Documented
@InjectionScope
public @interface This
{
/** True if the dependency is optional, only fail
* if this is false
*/
boolean optional() default false;
}