Package org.ebfhub.fastprotobuf
Class FastProtoGenerator
java.lang.Object
com.salesforce.jprotoc.Generator
org.ebfhub.fastprotobuf.FastProtoGenerator
public class FastProtoGenerator
extends com.salesforce.jprotoc.Generator
FastProtoGenerator class.
- Version:
- $Id: $Id
- Author:
- mac
-
Constructor Summary
Constructors Constructor Description FastProtoGenerator(boolean debug)Constructor for FastProtoGenerator. -
Method Summary
Modifier and Type Method Description voidaddParseMethodHelpers(org.ebfhub.fastprotobuf.JavaOutput sb, com.google.protobuf.DescriptorProtos.DescriptorProto pp, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info)addParseMethodHelpers.voidaddSetValue(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo typeInfo, com.google.protobuf.DescriptorProtos.FieldDescriptorProto field, String paramName, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, String thisStr)addSetValue.voidcreateAdd(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, Map<org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo,List<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>> byType, String thisClass, boolean makePrivate, boolean defer)createAdd.voidcreateAddMethod(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo type, com.google.protobuf.DescriptorProtos.FieldDescriptorProto field)createAddMethod.voidcreateSet(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, Map<org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo,List<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>> byType, String thisClass, boolean makePrivate, boolean defer)createSet.List<com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File>generateFiles(com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest request)StringgetMainClassName()getMainClassName.StringgetMainPackageName()getMainPackageName.StringgetTestOutput()Getter for the fieldtestOutput.static voidmain(String[] args)main.
-
Constructor Details
-
FastProtoGenerator
public FastProtoGenerator(boolean debug)Constructor for FastProtoGenerator.
- Parameters:
debug- a boolean.
-
-
Method Details
-
main
main.
- Parameters:
args- an array ofStringobjects.
-
generateFiles
public List<com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File> generateFiles(com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest request) throws com.salesforce.jprotoc.GeneratorException- Overrides:
generateFilesin classcom.salesforce.jprotoc.Generator- Throws:
com.salesforce.jprotoc.GeneratorException
-
getTestOutput
Getter for the field
testOutput.- Returns:
- a
Stringobject.
-
getMainClassName
getMainClassName.
- Returns:
- a
Stringobject.
-
getMainPackageName
getMainPackageName.
- Returns:
- a
Stringobject.
-
addParseMethodHelpers
public void addParseMethodHelpers(org.ebfhub.fastprotobuf.JavaOutput sb, com.google.protobuf.DescriptorProtos.DescriptorProto pp, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info)addParseMethodHelpers.
- Parameters:
sb- aJavaOutputobject.pp- aDescriptorProtos.DescriptorProtoobject.info- aFastProtoGenerator.ClassInfoobject.
-
createSet
public void createSet(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, Map<org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo,List<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>> byType, String thisClass, boolean makePrivate, boolean defer)createSet.
- Parameters:
sb- aJavaOutputobject.info- aFastProtoGenerator.ClassInfoobject.byType- aMapobject.thisClass- What to use for linkmakePrivate- Make the fn privatedefer- Defer to main class
-
createAdd
public void createAdd(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, Map<org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo,List<com.google.protobuf.DescriptorProtos.FieldDescriptorProto>> byType, String thisClass, boolean makePrivate, boolean defer)createAdd.
- Parameters:
sb- aJavaOutputobject.info- aFastProtoGenerator.ClassInfoobject.byType- aMapobject.thisClass- What to use for linkmakePrivate- Make the fn privatedefer- Defer to main class
-
createAddMethod
public void createAddMethod(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo type, com.google.protobuf.DescriptorProtos.FieldDescriptorProto field)createAddMethod.
- Parameters:
sb- aJavaOutputobject.info- aFastProtoGenerator.ClassInfoobject.type- aFastProtoGenerator.TypeInfoobject.field- aDescriptorProtos.FieldDescriptorProtoobject.
-
addSetValue
public void addSetValue(org.ebfhub.fastprotobuf.JavaOutput sb, org.ebfhub.fastprotobuf.FastProtoGenerator.TypeInfo typeInfo, com.google.protobuf.DescriptorProtos.FieldDescriptorProto field, String paramName, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info, String thisStr)addSetValue.
- Parameters:
sb- aJavaOutputobject.typeInfo- aFastProtoGenerator.TypeInfoobject.field- aDescriptorProtos.FieldDescriptorProtoobject.paramName- aStringobject.info- aFastProtoGenerator.ClassInfoobject.thisStr- Access the current object
-