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
    void addParseMethodHelpers​(org.ebfhub.fastprotobuf.JavaOutput sb, com.google.protobuf.DescriptorProtos.DescriptorProto pp, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info)
    addParseMethodHelpers.
    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.
    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.
    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.
    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.
    List<com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File> generateFiles​(com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest request)
    String getMainClassName()
    getMainClassName.
    String getMainPackageName()
    getMainPackageName.
    String getTestOutput()
    Getter for the field testOutput.
    static void main​(String[] args)
    main.

    Methods inherited from class com.salesforce.jprotoc.Generator

    applyTemplate, generate, makeFile, makeFile

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FastProtoGenerator

      public FastProtoGenerator​(boolean debug)

      Constructor for FastProtoGenerator.

      Parameters:
      debug - a boolean.
  • Method Details

    • main

      public static void main​(String[] args)

      main.

      Parameters:
      args - an array of String objects.
    • generateFiles

      public List<com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File> generateFiles​(com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest request) throws com.salesforce.jprotoc.GeneratorException
      Overrides:
      generateFiles in class com.salesforce.jprotoc.Generator
      Throws:
      com.salesforce.jprotoc.GeneratorException
    • getTestOutput

      public String getTestOutput()

      Getter for the field testOutput.

      Returns:
      a String object.
    • getMainClassName

      public String getMainClassName()

      getMainClassName.

      Returns:
      a String object.
    • getMainPackageName

      public String getMainPackageName()

      getMainPackageName.

      Returns:
      a String object.
    • addParseMethodHelpers

      public void addParseMethodHelpers​(org.ebfhub.fastprotobuf.JavaOutput sb, com.google.protobuf.DescriptorProtos.DescriptorProto pp, org.ebfhub.fastprotobuf.FastProtoGenerator.ClassInfo info)

      addParseMethodHelpers.

      Parameters:
      sb - a JavaOutput object.
      pp - a DescriptorProtos.DescriptorProto object.
      info - a FastProtoGenerator.ClassInfo object.
    • 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 - a JavaOutput object.
      info - a FastProtoGenerator.ClassInfo object.
      byType - a Map object.
      thisClass - What to use for link
      makePrivate - Make the fn private
      defer - 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 - a JavaOutput object.
      info - a FastProtoGenerator.ClassInfo object.
      byType - a Map object.
      thisClass - What to use for link
      makePrivate - Make the fn private
      defer - 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 - a JavaOutput object.
      info - a FastProtoGenerator.ClassInfo object.
      type - a FastProtoGenerator.TypeInfo object.
      field - a DescriptorProtos.FieldDescriptorProto object.
    • 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 - a JavaOutput object.
      typeInfo - a FastProtoGenerator.TypeInfo object.
      field - a DescriptorProtos.FieldDescriptorProto object.
      paramName - a String object.
      info - a FastProtoGenerator.ClassInfo object.
      thisStr - Access the current object