@Test public void generatesJavaFile() throws Exception { MatcherAssert.assertThat( new Method( "send", new StickyList<>( new Parameter("receiver", "Person"), new Parameter("content", "Content") ), "Message" ).java(), Matchers.is( "Message send(final Person receiver, final Content content)" ) ); }
public String java() { return new UncheckedText( new FormattedText( "%s %s(%s)", this.type, this.name, new UncheckedText( new JoinedText( ", ", new Mapped<>( Parameter::java, this.parameters ) ) ).asString() ) ).asString(); }
Method { public String java() { return new UncheckedText( new FormattedText( "%s %s(%s)", this.type, this.name, new UncheckedText( new JoinedText( ", ", new Mapped<>( Parameter::java, this.parameters ) ) ).asString() ) ).asString(); } }
Method { public String java() { return new UncheckedText( new FormattedText( "%s %s(%s)", this.type, this.name, new UncheckedText( new JoinedText( ", ", new Mapped<>( Parameter::java, this.parameters ) ) ).asString() ) ).asString(); } Method(final String mtd, final Collection<Parameter> params,
        final String rtp); }
Method { public String java() { return new UncheckedText( new FormattedText( "%s %s(%s)", this.type, this.name, new UncheckedText( new JoinedText( ", ", new Mapped<>( Parameter::java, this.parameters ) ) ).asString() ) ).asString(); } Method(final String mtd, final Collection<Parameter> params,
        final String rtp); String java(); Iterable<Directive> xml(); }
Method { public String java() { return new UncheckedText( new FormattedText( "%s %s(%s)", this.type, this.name, new UncheckedText( new JoinedText( ", ", new Mapped<>( Parameter::java, this.parameters ) ) ).asString() ) ).asString(); } Method(final String mtd, final Collection<Parameter> params,
        final String rtp); String java(); Iterable<Directive> xml();  }