Package io.protostuff.compiler
Class CompilerMain
java.lang.Object
io.protostuff.compiler.CompilerMain
The main execution point of compiling protos.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
When there is no matching compiler for theProtoModule.getOutput()
. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static CompilerMain.CompilerResolver
(package private) static final HashMap
<String, ProtoCompiler> static final Pattern
static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCompiler
(ProtoCompiler compiler) static void
addOptionsTo
(ProtoModule module, String[] options) static void
addOptionsTo
(Properties target, String[] options, Properties config) static void
compile
(ProtoModule module) static void
compile
(List<ProtoModule> modules) (package private) static void
compileProfile
(Properties props, String profile, CachingProtoLoader loader, Properties globalOptions, String[] rootProfileOptions, int nestCount) (package private) static void
compileWithArgs
(String[] args, int offset, int limit) (package private) static void
private static String
createGeneratorName
(String output) private static boolean
isAllowedCharacter
(char c) private static boolean
isAlpha
(char c) static boolean
isAvailableOutput
(String output) private static boolean
isNumber
(char c) static ProtoModule
loadModule
(Properties props, String name, CachingProtoLoader loader, File baseDirForSource, File baseDirForOutput, Properties globalOptions, String[] profileOptions, String[] rootProfileOptions) static List
<ProtoModule> loadModules
(File file, File baseDirForSource, File baseDirForOutput) static List
<ProtoModule> static List
<ProtoModule> loadModules
(Properties props) static List
<ProtoModule> loadModules
(Properties props, File baseDirForSource, File baseDirForOutput) static void
static Properties
newGlobalOptions
(Properties props) static Properties
newOptions
(Properties props, String key) Returns an option (Properties
) that contains the csv entries.(package private) static ProtoModule
newProtoModule
(String source, String output, String encoding, String outputDir, File baseDirForSource, File baseDirForOutput) (package private) static void
propsErr()
(package private) static Properties
(package private) static Properties
(package private) static Properties
putIncludes
(Properties props) static void
(package private) static void
usage()
-
Field Details
-
SILENT_MODE
public static final boolean SILENT_MODE -
COMMA
-
__compilers
-
__compilerResolver
-
-
Constructor Details
-
CompilerMain
public CompilerMain()
-
-
Method Details
-
setCompilerResolver
-
addCompiler
-
isAvailableOutput
-
propsFrom
- Throws:
IOException
-
propsFrom
- Throws:
IOException
-
loadModules
public static List<ProtoModule> loadModules(File file, File baseDirForSource, File baseDirForOutput) -
loadModules
-
loadModules
-
loadModules
public static List<ProtoModule> loadModules(Properties props, File baseDirForSource, File baseDirForOutput) -
loadModule
public static ProtoModule loadModule(Properties props, String name, CachingProtoLoader loader, File baseDirForSource, File baseDirForOutput, Properties globalOptions, String[] profileOptions, String[] rootProfileOptions) -
newProtoModule
-
addOptionsTo
-
addOptionsTo
-
propsErr
static void propsErr() -
usage
static void usage() -
compile
- Throws:
Exception
-
createGeneratorName
-
isAllowedCharacter
private static boolean isAllowedCharacter(char c) -
isNumber
private static boolean isNumber(char c) -
isAlpha
private static boolean isAlpha(char c) -
compile
- Throws:
Exception
-
compileProfile
static void compileProfile(Properties props, String profile, CachingProtoLoader loader, Properties globalOptions, String[] rootProfileOptions, int nestCount) throws Exception - Throws:
Exception
-
compileWithNoArgs
- Throws:
Exception
-
compileWithArgs
- Throws:
Exception
-
putIncludes
-
newGlobalOptions
-
newOptions
Returns an option (Properties
) that contains the csv entries. -
main
- Throws:
Exception
-