@@ -0,0 +1,2138 @@
+/*%0A * Copyright (C) 2014 Google Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage dagger.internal;%0A%0Aimport dagger.MembersInjector;%0A%0Aimport javax.inject.Inject;%0A%0A/**%0A * Basic %7B@link MembersInjector%7D implementations used by the framework.%0A *%0A * @author Gregory Kick%0A * @since 2.0%0A */%0Apublic final class MembersInjectors %7B%0A  /**%0A   * Returns a %7B@link MembersInjector%7D implementation that injects no members%0A   *%0A   * %3Cp%3ENote that there is no verification that the type being injected does not have %7B@link Inject%7D%0A   * members, so care should be taken to ensure appropriate use.%0A   */%0A  @SuppressWarnings(%22unchecked%22)%0A  public static %3CT%3E MembersInjector%3CT%3E noOp() %7B%0A    return (MembersInjector%3CT%3E) NoOpMembersInjector.INSTANCE;%0A  %7D%0A%0A  private static enum NoOpMembersInjector implements MembersInjector%3CObject%3E %7B%0A    INSTANCE;%0A%0A    @Override public void injectMembers(Object instance) %7B%0A      if (instance == null) %7B%0A        throw new NullPointerException();%0A      %7D%0A    %7D%0A  %7D%0A%0A  /**%0A   * Returns a %7B@link MembersInjector%7D that delegates to the %7B@link MembersInjector%7D of its%0A   * supertype.  This is useful for cases where a type is known not to have its own %7B@link Inject%7D%0A   * members, but must still inject members on its supertype(s).%0A   *%0A   * %3Cp%3ENote that there is no verification that the type being injected does not have %7B@link Inject%7D%0A   * members, so care should be taken to ensure appropriate use.%0A   */%0A  @SuppressWarnings(%22unchecked%22)%0A  public static %3CT%3E MembersInjector%3CT%3E delegatingTo(MembersInjector%3C? super T%3E delegate) %7B%0A    return (MembersInjector%3CT%3E) delegate;%0A  %7D%0A%0A  private MembersInjectors() %7B%7D%0A%7D%0A

Add the MembersInjectors class, which provides a few standard MembersInjector implementations that are to be used from within generated components. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=71274942