Class ProtoModule
java.lang.Object
io.protostuff.compiler.ProtoModule
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ProtoModule
Configuration for the proto w/c ontains the compile options and arguments.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Propertiesstatic final Stringprivate Stringprivate Stringstatic final booleantruefor JDKs 9, 10, 11, etc;falsefor 1.8 and below.private Propertiesprivate Stringprivate Fileprivate CachingProtoLoaderprivate static final longprivate File -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttrs()Alias forgetAttributes().booleanDetermines if current runtime environment is JDK version 9 or above.voidsetAttribute(String key, Object value) voidsetCachingProtoLoader(CachingProtoLoader protoLoader) voidsetEncoding(String encoding) voidsetGenerator(String generator) Set current generator namevoidvoidsetOptions(Properties options) voidvoidsetOutputDir(File outputDir) void
-
Field Details
-
DEFAULT_GENERATOR_NAME
- See Also:
-
JAVA_9_AND_ABOVE
public static final boolean JAVA_9_AND_ABOVEtruefor JDKs 9, 10, 11, etc;falsefor 1.8 and below. -
serialVersionUID
private static final long serialVersionUID- See Also:
-
source
-
output
-
encoding
-
outputDir
-
generator
-
options
-
config
Properties config -
protoLoader
-
attributes
-
-
Constructor Details
-
ProtoModule
public ProtoModule() -
ProtoModule
-
-
Method Details
-
getSource
- Returns:
- the source
-
setSource
- Parameters:
source- the source to set
-
getOutput
- Returns:
- the output
-
setOutput
- Parameters:
output- the output to set
-
isJavaVersion9
public boolean isJavaVersion9()Determines if current runtime environment is JDK version 9 or above. -
getGenerator
- Returns:
- the current generator name that can be used generated code for identification
-
setGenerator
Set current generator name- Parameters:
generator- the generator name
-
getEncoding
- Returns:
- the encoding
-
setEncoding
- Parameters:
encoding- the encoding to set
-
getOutputDir
- Returns:
- the outputDir
-
setOutputDir
- Parameters:
outputDir- the outputDir to set
-
getOptions
- Returns:
- the options
-
setOptions
- Parameters:
options-
-
getOption
-
setOption
-
getCachingProtoLoader
-
setCachingProtoLoader
-
getConfig
-
setAttribute
-
getAttrs
Alias forgetAttributes(). -
getAttributes
-