/*
 * Copyright (C) 2012 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package dagger;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotates a class that contributes to the object graph.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Module {
  /**
   * Returns classes that object graphs created with this module must be able to
   * inject. This includes both classes passed to {@link ObjectGraph#get} and
   * the types of instances passed {@link ObjectGraph#inject}.
   *
   * <p>It is an error to call {@link ObjectGraph#get} or {@link
   * ObjectGraph#inject} with a type that isn't listed in the {@code injects}
   * set for any of the object graph's modules. Making such a call will trigger
   * an {@code IllegalArgumentException} at runtime.
   *
   * <p>Maintaining this set is onerous, but doing so provides benefits to the
   * application. This set enables dagger to perform more aggressive static
   * analysis than would be otherwise possible:
   * <ul>
   *   <li><strong>Detect missing bindings.</strong> Dagger can check that all
   *       injected dependencies can be satisfied. Set {@code complete=false} to
   *       disable this check for the current module.
   *   <li><strong>Detect unused bindings.</strong> Dagger can check that all
   *       provides methods are used to satisfy injected dependencies. Set
   *       {@code library=true} to disable this check for the current module.
   * </ul>
   */
  Class<?>[] injects() default { };
  Class<?>[] staticInjections() default { };

  /**
   * True if {@code @Provides} methods from this module are permitted to
   * override those of other modules. This is a dangerous feature as it permits
   * binding conflicts to go unnoticed. It should only be used in test and
   * development modules.
   */
  boolean overrides() default false;

  /**
   * Additional {@code @Module}-annotated classes from which this module is
   * composed. The de-duplicated contributions of the modules in
   * {@code includes}, and of their inclusions recursively, are all contributed
   * to the object graph.
   */
  Class<?>[] includes() default { };

  /**
   * An optional {@code @Module}-annotated class upon which this module can be
   * {@link ObjectGraph#plus added} to form a complete graph.
   */
  Class<?> addsTo() default Void.class;

  /**
   * True if all of the bindings required by this module can also be satisfied
   * by this module, its {@link #includes} and its {@link #addsTo}. If a module
   * is complete it is eligible for additional static checking: tools can detect
   * if required bindings are not available. Modules that have external
   * dependencies must use {@code complete = false}.
   */
  boolean complete() default true;

  /**
   * False if all the included bindings in this module are necessary to satisfy
   * all of its {@link #injects injectable types}. If a module is not a library
   * module, it is eligible for additional static checking: tools can detect if
   * included bindings are not necessary. If you provide bindings that are not
   * used by this module's graph, then you must declare {@code library = true}.
   *
   * <p>This is intended to help you detect dead code.  As of 2.0 Dagger ignores
   * this property and it is present for compatibility with Dagger 1.x during
   * migrations.
   */
  // TODO(cgruber): Deprecate this property.
  boolean library() default true;
}

@@ -939,3145 +939,290 @@
   * 
-Returns classes that object graphs created with this module must be able to%0A   * inject. This includes both classes passed to %7B@link ObjectGraph#get%7D and%0A   * the types of instances passed %7B@link ObjectGraph#inject%7D.%0A   *%0A   * %3Cp%3EIt is an error to call %7B@link ObjectGraph#get%7D or %7B@link%0A   * ObjectGraph#inject%7D with a type that isn't listed in the %7B@code injects%7D%0A   * set for any of the object graph's modules. Making such a call will trigger%0A   * an %7B@code IllegalArgumentException%7D at runtime.%0A   *%0A   * %3Cp%3EMaintaining this set is onerous, but doing so provides benefits to the%0A   * application. This set enables dagger to perform more aggressive static%0A   * analysis than would be otherwise possible:%0A   * %3Cul%3E%0A   *   %3Cli%3E%3Cstrong%3EDetect missing bindings.%3C/strong%3E Dagger can check that all%0A   *       injected dependencies can be satisfied. Set %7B@code complete=false%7D to%0A   *       disable this check for the current module.%0A   *   %3Cli%3E%3Cstrong%3EDetect unused bindings.%3C/strong%3E Dagger can check that all%0A   *       provides methods are used to satisfy injected dependencies. Set%0A   *       %7B@code library=true%7D to disable this check for the current module.%0A   * %3C/ul%3E%0A   */%0A  Class%3C?%3E%5B%5D injects() default %7B %7D;%0A  Class%3C?%3E%5B%5D staticInjections() default %7B %7D;%0A%0A  /**%0A   * True if %7B@code @Provides%7D methods from this module are permitted to%0A   * override those of other modules. This is a dangerous feature as it permits%0A   * binding conflicts to go unnoticed. It should only be used in test and%0A   * development modules.%0A   */%0A  boolean overrides() default false;%0A%0A  /**%0A   * Additional %7B@code @Module%7D-annotated classes from which this module is%0A   * composed. The de-duplicated contributions of the modules in%0A   * %7B@code includes%7D, and of their inclusions recursively, are all contributed%0A   * to the object graph.%0A   */%0A  Class%3C?%3E%5B%5D includes() default %7B %7D;%0A%0A  /**%0A   * An optional %7B@code @Module%7D-annotated class upon which this module can be%0A   * %7B@link ObjectGraph#plus added%7D to form a complete graph.%0A   */%0A  Class%3C?%3E addsTo() default Void.class;%0A%0A  /**%0A   * True if all of the bindings required by this module can also be satisfied%0A   * by this module, its %7B@link #includes%7D and its %7B@link #addsTo%7D. If a module%0A   * is complete it is eligible for additional static checking: tools can detect%0A   * if required bindings are not available. Modules that have external%0A   * dependencies must use %7B@code complete = false%7D.%0A   */%0A  boolean complete() default true;%0A%0A  /**%0A   * False if all the included bindings in this module are necessary to satisfy%0A   * all of its %7B@link #injects injectable types%7D. If a module is not a library%0A   * module, it is eligible for additional static checking: tools can detect if%0A   * included bindings are not necessary. If you provide bindings that are not%0A   * used by this module's graph, then you must declare %7B@code library = true%7D.%0A   *%0A   * %3Cp%3EThis is intended to help you detect dead code.  As of 2.0 Dagger ignores%0A   * this property and it is present for compatibility with Dagger 1.x during%0A   * migrations.%0A   */%0A  // TODO(cgruber): Deprecate this property.%0A  boolean library() default true
+Additional %7B@code @Module%7D-annotated classes from which this module is%0A   * composed. The de-duplicated contributions of the modules in%0A   * %7B@code includes%7D, and of their inclusions recursively, are all contributed%0A   * to the object graph.%0A   */%0A  Class%3C?%3E%5B%5D includes() default %7B%7D
 ;%0A%7D%0A

Remove Dagger 1.x compatible annotation members from the Module in the open-source project. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=90433194