Package com.salesforce.jprotoc
Class ProtocPlugin
java.lang.Object
com.salesforce.jprotoc.ProtocPlugin
ProtocPlugin is the main entry point for running one or more java-base protoc plugins. This class handles I/O marshaling and error reporting.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDebug a single generator using the parsed proto descriptor.static voidDebug multiple generators using the parsed proto descriptor, aggregating their results.static voiddebug(List<Generator> generators, List<com.google.protobuf.GeneratedMessage.GeneratedExtension> extensions, String dumpPath) Debug multiple generators using the parsed proto descriptor, aggregating their results.static voidApply a single generator to the parsed proto descriptor.static voidApply multiple generators to the parsed proto descriptor, aggregating their results.static voidgenerate(List<Generator> generators, List<com.google.protobuf.GeneratedMessage.GeneratedExtension> extensions) Apply multiple generators to the parsed proto descriptor, aggregating their results.
-
Method Details
-
generate
Apply a single generator to the parsed proto descriptor.- Parameters:
generator- The generator to run.
-
generate
Apply multiple generators to the parsed proto descriptor, aggregating their results.- Parameters:
generators- The list of generators to run.
-
generate
public static void generate(@Nonnull List<Generator> generators, List<com.google.protobuf.GeneratedMessage.GeneratedExtension> extensions) Apply multiple generators to the parsed proto descriptor, aggregating their results. Also register the given extensions so they may be processed by the generator.- Parameters:
generators- The list of generators to run.extensions- The list of extensions to register.
-
debug
Debug a single generator using the parsed proto descriptor.- Parameters:
generator- The generator to run.dumpPath- The path to a descriptor dump on the filesystem.
-
debug
Debug multiple generators using the parsed proto descriptor, aggregating their results.- Parameters:
generators- The list of generators to run.dumpPath- The path to a descriptor dump on the filesystem.
-
debug
public static void debug(@Nonnull List<Generator> generators, List<com.google.protobuf.GeneratedMessage.GeneratedExtension> extensions, @Nonnull String dumpPath) Debug multiple generators using the parsed proto descriptor, aggregating their results. Also register the given extensions so they may be processed by the generator.- Parameters:
generators- The list of generators to run.extensions- The list of extensions to register.dumpPath- The path to a descriptor dump on the filesystem.
-