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 * Indicates that the type should be included in the named auto-fragment.
012 * See the {@link AutoFragment} documentation for constraints about using
013 * an auto-fragment.
014 *
015 * @see AutoFragment
016 */
017@Documented
018@Retention( RetentionPolicy.RUNTIME )
019@Target( ElementType.TYPE )
020public @interface ContributeTo
021{
022  /**
023   * An opaque string that matches a single auto-fragment key.
024   * The annotation processor will generate an error if there are multiple {@link AutoFragment} types that
025   * match the key on the same classpath. The annotation will generate a suppressable warning if there are
026   * no {@link AutoFragment} types with a matching key.
027   *
028   * @return an auto-fragment key.
029   */
030  @Nonnull
031  String value();
032}