@Test public void write_returns_parent_writer() throws Exception { FileContextTestImpl fileContext = new FileContextTestImpl(); DAWriter parent = new DAWriter() { }; DAInterfaceMethodWriter<DAWriter> classWriter = new DAInterfaceMethodWriter<DAWriter>("name", DATypeFactory.from(String.class), fileContext, 1, parent ); assertThat(classWriter.write()).isSameAs(parent); }
public T write() throws IOException { commons.appendAnnotations(annotations); commons.appendIndent(); appendReturnType(); commons.append(name); appendParams(params); commons.append(";"); commons.newLine(); return parent; }
DAInterfaceMethodWriter extends AbstractDAWriter<T> { public T write() throws IOException { commons.appendAnnotations(annotations); commons.appendIndent(); appendReturnType(); commons.append(name); appendParams(params); commons.append(";"); commons.newLine(); return parent; } }
DAInterfaceMethodWriter extends AbstractDAWriter<T> { public T write() throws IOException { commons.appendAnnotations(annotations); commons.appendIndent(); appendReturnType(); commons.append(name); appendParams(params); commons.append(";"); commons.newLine(); return parent; } DAInterfaceMethodWriter(String name, DAType returnType, FileContext fileContext, int indentOffset, T parent); }
DAInterfaceMethodWriter extends AbstractDAWriter<T> { public T write() throws IOException { commons.appendAnnotations(annotations); commons.appendIndent(); appendReturnType(); commons.append(name); appendParams(params); commons.append(";"); commons.newLine(); return parent; } DAInterfaceMethodWriter(String name, DAType returnType, FileContext fileContext, int indentOffset, T parent); DAInterfaceMethodWriter<T> withAnnotations(@Nullable DAAnnotation... annotations); DAInterfaceMethodWriter<T> withAnnotations(@Nullable List<DAAnnotation> annotations); DAInterfaceMethodWriter<T> withParams(@Nullable DAParameter... params); DAInterfaceMethodWriter<T> withParams(@Nullable List<DAParameter> params); T write(); }
DAInterfaceMethodWriter extends AbstractDAWriter<T> { public T write() throws IOException { commons.appendAnnotations(annotations); commons.appendIndent(); appendReturnType(); commons.append(name); appendParams(params); commons.append(";"); commons.newLine(); return parent; } DAInterfaceMethodWriter(String name, DAType returnType, FileContext fileContext, int indentOffset, T parent); DAInterfaceMethodWriter<T> withAnnotations(@Nullable DAAnnotation... annotations); DAInterfaceMethodWriter<T> withAnnotations(@Nullable List<DAAnnotation> annotations); DAInterfaceMethodWriter<T> withParams(@Nullable DAParameter... params); DAInterfaceMethodWriter<T> withParams(@Nullable List<DAParameter> params); T write();  }