001package sting;
002
003import java.lang.annotation.Documented;
004import java.lang.annotation.ElementType;
005import java.lang.annotation.Retention;
006import java.lang.annotation.RetentionPolicy;
007import java.lang.annotation.Target;
008import javax.annotation.Nonnull;
009
010/**
011 * Declare the types published by a component.
012 * This annotation is used to explicitly specify which types that a component can provide.
013 * The annotation may be applied to a class annotated with {@link Injectable} or to methods contained within a
014 * type annotated by {@link Fragment}.
015 *
016 * <p>If this annotation is applied to a class then the class must be able to be assigned to the types specified
017 * by this annotation. If the annotation is applied to a method then the return type of the method must be able
018 * to be assigned to the types specified by this annotation.</p>
019 */
020@Documented
021@Retention( RetentionPolicy.RUNTIME )
022@Target( { ElementType.TYPE, ElementType.METHOD } )
023public @interface Typed
024{
025  /**
026   * The types published by the component.
027   *
028   * @return the types published by the component.
029   */
030  @Nonnull
031  Class<?>[] value();
032}