Skip to content

Instantly share code, notes, and snippets.

@kzk
Created November 18, 2010 15:31
Show Gist options
  • Save kzk/705124 to your computer and use it in GitHub Desktop.
Save kzk/705124 to your computer and use it in GitHub Desktop.
class ExistingClass implements MessagePackTemplateProvider {
// no serialization is needed;
Logger LOG;
string internal_data;
// data
int a;
int b;
string c;
public Template getTemplate() {
FieldList fl = new FieldList();
fl.add("a", FieldOption.REQUIRED);
fl.add("b", FieldOption.REQUIRED);
fl.add("c", FieldOption.OPTIONAL);
return DynamicTemplate.create(ExistingClass.class, fl);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment