
templates.java.immutable.st Maven / Gradle / Ivy
_structbody(context) ::= <<
<_constructor(context)>
<_builder(context)>
}; separator="\n\n">
>>
_field(field) ::= <<
private final ;
<_fieldAnnotation(field)>
public () { return ; }
>>
_constructor(element) ::= <<
@ThriftConstructor
public <_params(element.fields)> {
}; separator="\n">
}
>>
_ctorAssignment(field) ::= <<
this. = ;
>>
_builder(element) ::= <<
public static class Builder {
}; separator="\n">
public Builder() { }
public Builder( other) {
}; separator="\n">
}
public build() {
return new (
}; separator=",\n">
);
}
}
>>
_builderInitAssignment(field) ::= <<
this. = other.;
>>
_builder_field(field) ::= <<
private ;
public Builder ( ) {
this. = ;
return this;
}
>>
_union_ctor(context, field) ::= <<
@ThriftConstructor
public (final ) {
this.value = ;
this.id = ;
this.name = "";
}
>>
_union_body(context) ::= <<
private final Object value;
private final int id;
private final String name;
}; separator="\n\n">
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy