Class PbjCompiler
java.lang.Object
com.hedera.pbj.compiler.PbjCompiler
Compiler entry point to generate java src code from protobuf proto schema files.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PbjCompiler
public PbjCompiler()
-
-
Method Details
-
compileFilesIn
public static void compileFilesIn(Iterable<File> sourceFiles, Iterable<File> classpath, Set<File> sourceRoots, File mainOutputDir, File testOutputDir, String javaPackageSuffix, boolean generateTestClasses) throws Exception Compile source files and generate PBJ models.- Parameters:
sourceFiles- all the source files to compileclasspath- protobuf files in dependencies located on the Java compile classpathsourceRoots- folders containing the source filesmainOutputDir- output directory for generated model, codecs, and schema ("main" files)testOutputDir- output directory for generated tests ("test" files)javaPackageSuffix- an optional, nullable suffix to add to the Java package name in generated classes, e.g. ".pbj", when an explicit `pbj.java_package` option is missing- Throws:
Exception
-