io.protostuff.generator.java.message-base.stg Maven / Gradle / Ivy
delimiters "<", ">"
field_declaration(field) ::= <<
private ;
private java.util.List\ ;
private ;
private int ;
private ;
>>
oneof_case(oneOf) ::= <<
public () {
return ;
}
>>
oneof_fields(oneOf) ::= <<
private = .;
private Object = null;
>>
message_bit_field(name) ::= <<
private int ;
>>
default_enum_value(enum) ::= <%
}>
%>
field_initializer(field) ::= <%
this. = java.util.Collections.emptyMap();
this. = java.util.Collections.emptyList();
this. = ..getNumber();
this. = ;
%>
equals(message, builder) ::= <<
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || this.getClass() != obj.getClass()) {
return false;
}
Builder that = (Builder) obj;
that = () obj;
return true;
return true;
}
>>
hash_code(message) ::= <<
@Override
public int hashCode() {
int result = 1;
return result;
return 0;
}
>>
to_string(message) ::= <<
@Override
public String toString() {
java.util.List\ parts = new java.util.ArrayList\<>();
return "{" + String.join(", ", parts) + "}";
}
>>
field_equals_part(field) ::= <<
if (!java.util.Objects.equals(this., that.)) {
return false;
}
>>
oneof_field_equals_part(oneof) ::= <<
if (!(java.util.Objects.equals(this., that.)
&& java.util.Objects.equals(this., that.))) {
return false;
}
>>
field_hashCode_part(field) ::= <<
result = 31 * result + .hashCode(this.);
result = 31 * result + Integer.hashCode(this.);
result = 31 * result + (this. == null ? 0 : this..hashCode());
>>
oneof_field_hashCode_part(oneof) ::= <<
result = 31 * result + this..hashCode();
result = 31 * result + (this. == null ? 0 : this..hashCode());
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy