Package de.haumacher.msgbuf.generator
Class MessageGenerator
java.lang.Object
de.haumacher.msgbuf.generator.util.AbstractFileGenerator
de.haumacher.msgbuf.generator.util.AbstractJavaGenerator
de.haumacher.msgbuf.generator.AbstractMessageGenerator
de.haumacher.msgbuf.generator.MessageGenerator
- All Implemented Interfaces:
Definition.Visitor<Void,,Void> FileGenerator
public class MessageGenerator
extends AbstractMessageGenerator
implements Definition.Visitor<Void,Void>
Generator for message data classes.-
Field Summary
Fields inherited from class de.haumacher.msgbuf.generator.AbstractMessageGenerator
_noInterfaces, _packageSuffix -
Constructor Summary
ConstructorsConstructorDescriptionMessageGenerator(NameTable table, Map<String, Option> options, boolean isInterface, String packageSuffix, MessageDef def, GeneratorPlugin plugin) Creates aMessageGenerator. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddocComment(String comment) protected voidgenerate()booleanisBinary()Whether binary IO should be generated.booleanisJson()Whether to generate JSON serialization code.booleanWhether reflective access should be generated.voidsetBinary(boolean binary) voidsetJson(boolean json) voidsetReflection(boolean reflection) Visit case forEnumDef.visit(MessageDef def, Void arg) Visit case forMessageDef.Methods inherited from class de.haumacher.msgbuf.generator.AbstractMessageGenerator
concreteSpecializations, getOptions, implName, isTrue, qImplName
-
Constructor Details
-
MessageGenerator
public MessageGenerator(NameTable table, Map<String, Option> options, boolean isInterface, String packageSuffix, MessageDef def, GeneratorPlugin plugin) Creates aMessageGenerator.- Parameters:
packageSuffix-
-
-
Method Details
-
isJson
public boolean isJson()Whether to generate JSON serialization code. -
setJson
public void setJson(boolean json) - See Also:
-
isBinary
public boolean isBinary()Whether binary IO should be generated. -
setBinary
public void setBinary(boolean binary) - See Also:
-
isReflection
public boolean isReflection()Whether reflective access should be generated. -
setReflection
public void setReflection(boolean reflection) - See Also:
-
generate
protected void generate()- Specified by:
generatein classAbstractFileGenerator
-
docComment
- Overrides:
docCommentin classAbstractJavaGenerator
-
visit
Description copied from interface:Definition.VisitorVisit case forEnumDef.- Specified by:
visitin interfaceDefinition.Visitor<Void,Void>
-
visit
Description copied from interface:Definition.VisitorVisit case forMessageDef.- Specified by:
visitin interfaceDefinition.Visitor<Void,Void>
-