Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.dyuproject.protostuff.compiler.java_bean_model_schema.stg Maven / Gradle / Ivy
group java_bean_model_schema : java_bean_model_base;
message_block(message, module, options, nested) ::= <<
public static class
{
}
>>
setter(field, options) ::= <
>>
getter(field, options) ::= <<
isget
>>
pre_cast_val(field) ::= <<
(short)
(byte)
(char)
>>
post_set_cast_val(field) ::= ""
pre_get_cast_val(field) ::= ""
post_get_cast_val(field) ::= ""
set_val(field, options, accessor, value, nocast) ::= <<
=
()
>>
get_val(field, options, accessor, this, nocast) ::= <<
.
.()
>>
resolve_annotated_native_type(field, boxed, bytesUnboxed) ::= <<
byte[]byte[]Byte[]
shortShort
byteByte
charChar
boolBoolean
>>
message_constructor(message, options) ::= <<
public () {}
>>
message_impl_declaration(message, options) ::= <<
,
implements
Schema\<\>
>>
message_default_instance(message, options) ::= <<
static final DEFAULT_INSTANCE = new ();
static final Schema\<\> SCHEMA = new ();
public static getDefaultInstance() { return DEFAULT_INSTANCE; }
public static Schema\<\> getSchema() { return SCHEMA; }
>>
field_id0_const() ::= "FIELD_NONE"
field_id_const(field, options) ::= "FIELD_"
field_id0_const_declare() ::= <<
public static final int FIELD_NONE = 0;
>>
field_id_const_declare(field, options) ::= <<
public static final int = ;
>>
message_impl_schema(message, options) ::= <<
public newMessage() {
return new ();
}
public Class\<\> typeClass() {
return .class;
}
public String messageName() {
return .class.getSimpleName();
}
public String messageFullName() {
return .class.getName();
}
>>
message_method_is_initialized_delegate(message, options) ::= <<
public boolean isInitialized( message) {
return message.isInitialized();
}
>>
message_method_is_initialized_true(message, options) ::= <<
public boolean isInitialized( message) {
return true;
}
>>
message_method_is_initialized(message, options) ::= <<
>>
get_message_field_schema_dependency(field, options) ::= ".getSchema()"
message_field_merge(message, options, name) ::= <<
public void mergeFrom(Input input, ) throws IOException {
for (int fieldIx = input.readFieldNumber(this); fieldIx != ; fieldIx = input.readFieldNumber(this)) {
mergeFrom(input, , fieldIx);
}
}
public void mergeFrom(Input input, , int fieldIx) throws IOException {
switch (fieldIx) {
case :
return;
default:
input.handleUnknownField(fieldIx, this);
}
}
>>
field_merge_switch(field, options, name, accessor) ::= <<
case :
>>
singular_field_merge_switch(field, options, name, accessor) ::= <<
.;
break;
.;
break;
.;
.;
break;
>>
rf_ms_get_collection(field, options, name, accessor) ::= <<
.get()
.
>>
rf_ms_set_collection(field, options, name, accessor) ::= <<
.set(new ArrayList\<\>());
. = new ArrayList\<\>();
.()"))>;
>>
rf_ms_collection_type(field, options) ::= <<
>>
repeated_field_merge_switch(field, options, name, accessor) ::= <<
if ( == null)
.add(input.mergeObject(null, ));
break;
if ( == null)
.()"))>;
.add(.valueOf(input.readEnum()));
break;
if ( == null)
.()"))>;
.add(input.readByteArray());
.add(input.read());
break;
>>
message_field_write(message, options, name) ::= <<
private static int[] FIELDS_TO_WRITE = { };
public int[] getWriteFields() { return FIELDS_TO_WRITE; }
public void writeTo(Output output, ) throws IOException {
int[] toWrite = getWriteFields();
for (int i = 0; i \< toWrite.length; i++) {
writeTo(output, , toWrite[i]);
}
}
public void writeTo(Output output, , int fieldIx) throws IOException {
switch (fieldIx) {
case :
break;
default:
break;
}
}
>>
field_write_switch(field, options, name, accessor) ::= <<
case :