package dagger.internal.codegen.writer;

import java.io.IOException;
import java.util.Set;

public class VariableWriter extends Modifiable implements Writable, HasClassReferences {
  private final TypeName type;
  private final String name;

  VariableWriter(TypeName type, String name) {
    this.type = type;
    this.name = name;
  }

  public TypeName type() {
    return type;
  }

  public String name() {
    return name;
  }

  @Override
  public Appendable write(Appendable appendable, Context context) throws IOException {
    writeModifiers(appendable);
    type.write(appendable, context);
    return appendable.append(' ').append(name);
  }

  @Override
  public Set<ClassName> referencedClasses() {
    return type.referencedClasses();
  }
}

@@ -85,16 +85,82 @@
 l.Set;%0A%0A
+import static com.google.common.base.Preconditions.checkNotNull;%0A%0A
 public c
@@ -364,20 +364,34 @@
 .type = 
+checkNotNull(
 type
+)
 ;%0A    th
@@ -400,20 +400,34 @@
 .name = 
+checkNotNull(
 name
+)
 ;%0A  %7D%0A%0A 

Add BindingGraph as a single canonical implementation of the resolve binding graph. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=75816059