Class ProtoModule

java.lang.Object
io.protostuff.compiler.ProtoModule
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ProtoModule

public class ProtoModule extends Object implements Serializable
Configuration for the proto w/c ontains the compile options and arguments.
See Also:
  • Field Details

    • DEFAULT_GENERATOR_NAME

      public static final String DEFAULT_GENERATOR_NAME
      See Also:
    • JAVA_9_AND_ABOVE

      public static final boolean JAVA_9_AND_ABOVE
      true for JDKs 9, 10, 11, etc; false for 1.8 and below.
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • source

      private File source
    • output

      private String output
    • encoding

      private String encoding
    • outputDir

      private File outputDir
    • generator

      private String generator
    • options

      private Properties options
    • config

      Properties config
    • protoLoader

      private CachingProtoLoader protoLoader
    • attributes

      private HashMap<String,Object> attributes
  • Constructor Details

    • ProtoModule

      public ProtoModule()
    • ProtoModule

      public ProtoModule(File source, String output, String encoding, File outputDir)
  • Method Details

    • getSource

      public File getSource()
      Returns:
      the source
    • setSource

      public void setSource(File source)
      Parameters:
      source - the source to set
    • getOutput

      public String getOutput()
      Returns:
      the output
    • setOutput

      public void setOutput(String output)
      Parameters:
      output - the output to set
    • isJavaVersion9

      public boolean isJavaVersion9()
      Determines if current runtime environment is JDK version 9 or above.
    • getGenerator

      public String getGenerator()
      Returns:
      the current generator name that can be used generated code for identification
    • setGenerator

      public void setGenerator(String generator)
      Set current generator name
      Parameters:
      generator - the generator name
    • getEncoding

      public String getEncoding()
      Returns:
      the encoding
    • setEncoding

      public void setEncoding(String encoding)
      Parameters:
      encoding - the encoding to set
    • getOutputDir

      public File getOutputDir()
      Returns:
      the outputDir
    • setOutputDir

      public void setOutputDir(File outputDir)
      Parameters:
      outputDir - the outputDir to set
    • getOptions

      public Properties getOptions()
      Returns:
      the options
    • setOptions

      public void setOptions(Properties options)
      Parameters:
      options -
    • getOption

      public String getOption(String key)
    • setOption

      public void setOption(String key, String value)
    • getCachingProtoLoader

      public CachingProtoLoader getCachingProtoLoader()
    • setCachingProtoLoader

      public void setCachingProtoLoader(CachingProtoLoader protoLoader)
    • getConfig

      public Properties getConfig()
    • setAttribute

      public void setAttribute(String key, Object value)
    • getAttrs

      public HashMap<String,Object> getAttrs()
      Alias for getAttributes().
    • getAttributes

      public HashMap<String,Object> getAttributes()