code: private void writeConstructor(GinjectorBindings bindings, SourceWriteUtil sourceWriteUtil,
        SourceWriter writer) {
      String implClassName = ginjectorNameGenerator.getClassName(bindings);
      if (bindings.getParent() == null) {
        // In outputInterfaceField, we verify that we have a bound injector if we
        // are the root module, so this should never be null:
        Class<?> boundGinjector = getBoundGinjector(bindings);
  
        String interfaceCanonicalClassName = boundGinjector.getCanonicalName();
        String fieldName = bindings.getNameGenerator().getGinjectorInterfaceFieldName();
  
        sourceWriteUtil.writeMethod(writer,
            String.format("public %s(%s %s)", implClassName, interfaceCanonicalClassName, fieldName),
            String.format("this.%1$s = %1$s;", fieldName));
      } else {
        String parentImplCanonicalClassName = ginjectorNameGenerator.getCanonicalClassName(
            bindings.getParent());
  
        writer.print(String.format("private final %s parent;\n", parentImplCanonicalClassName));
  
        sourceWriteUtil.writeMethod(writer, String.format("public %s getParent()",
            parentImplCanonicalClassName), "return parent;");
  
        sourceWriteUtil.writeMethod(writer, String.format("public %1$s(%2$s parent)",
            implClassName, parentImplCanonicalClassName), "this.parent = parent;");
      }
    }
docs: Writes the class constructor.  If there is a parent injector, also writes a
  field that stores it and a getter (used by fragments in this injector and
  its children).
  
  <p>The arguments to the constructor are:
  
  <p>For injectors other than the root, the parent injector.
  
  <p>For the root injector, the implementation of the ginjector interface.