Package com.salesforce.jprotoc
Class ProtocPlugin
- java.lang.Object
-
- com.salesforce.jprotoc.ProtocPlugin
-
public final class ProtocPlugin extends Object
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddebug(Generator generator, String dumpPath)Debug a single generator using the parsed proto descriptor.static voiddebug(List<Generator> generators, String dumpPath)Debug 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 voidgenerate(Generator generator)Apply a single generator to the parsed proto descriptor.static voidgenerate(List<Generator> generators)Apply 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 Detail
-
generate
public static void generate(@Nonnull Generator generator)
Apply a single generator to the parsed proto descriptor.- Parameters:
generator- The generator to run.
-
generate
public static void generate(@Nonnull List<Generator> generators)
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
public static void debug(@Nonnull Generator generator, @Nonnull String dumpPath)
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
public static void debug(@Nonnull List<Generator> generators, @Nonnull String dumpPath)
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.
-
-