Class VerveineJOptions

java.lang.Object
fr.inria.verveine.extractor.java.VerveineJOptions

public class VerveineJOptions extends Object
  • Field Details

    • OUTPUT_FILE

      public static final String OUTPUT_FILE
      Name (without extension) of the default file where to put the MSE model

      By default, the extension is provided by the output format

      See Also:
    • MSE_OUTPUT_FORMAT

      public static final String MSE_OUTPUT_FORMAT
      Option for MSE output format
      See Also:
    • JSON_OUTPUT_FORMAT

      public static final String JSON_OUTPUT_FORMAT
      Option for JSON output format
      See Also:
    • DEFAULT_CODE_VERSION

      public static final String DEFAULT_CODE_VERSION
      See Also:
    • allLocals

      protected boolean allLocals
      Whether to output all local variables (even those with primitive type) or not (default is not).
      Note: allLocals => not classSummary
    • codeVers

      protected String codeVers
      Option: The version of Java expected by the parser
    • anchors

      protected VerveineJOptions.AnchorOptions anchors
      Option: Whether to put SourceAnchors in the entities and/or associations
    • argPath

      protected Collection<String> argPath
      The arguments that were passed to the parser Needed to relativize the source file names
    • argFiles

      protected Collection<String> argFiles
    • classPathOptions

      protected String[] classPathOptions
    • excludePaths

      protected Collection<String> excludePaths
      pathnames to exclude from parsing.
      Accepts globbing expressions
    • excludeMatchers

      protected Collection<Pattern> excludeMatchers
      collection of matchers of file name to process excluding expr (see
    • fileEncoding

      protected String fileEncoding
      File encoding to use to read java files
    • outputFileName

      protected String outputFileName
      Name of the file where to put the MSE model. Defaults to OUTPUT_FILE
    • outputFormat

      public String outputFormat
      Format for saving the model in file: MSE or JSON
    • incrementalParsing

      protected boolean incrementalParsing
      Whether parsing is incremental

      Incremental means an entire project is parsed by parts, verveineJ saving and reloading the model respectively at the end of an execution and at the satrt of the next one

    • prettyPrint

      protected boolean prettyPrint
      If possible, should I use a prettyPrinter
    • debugging

      protected boolean debugging
      with additional tracing for debugging
    • commentText

      protected boolean commentText
      Text of comments exported in the model instead of using source anchor
    • parsingJdk

      protected boolean parsingJdk
      Am I parsing a JDK?
    • pathToSystemLibrary

      protected String pathToSystemLibrary
      Path to system library for JDT to use (for Java version <= 8: path to rt.jar) (for Java version > 8: path to jrt-fs.jar? have not try so to verify in practice)
  • Constructor Details

    • VerveineJOptions

      public VerveineJOptions()
  • Method Details

    • setOptions

      public void setOptions(String[] args)
    • setOption

      protected int setOption(String[] args, int i) throws IllegalArgumentException
      treats 1 argument or more starting at position i in the array of arguments args
      Parameters:
      args - TODO
      i - TODO
      Returns:
      The number of argument(s) treated
      Throws:
      IllegalArgumentException
    • setOptionClassPath

      protected String[] setOptionClassPath(String[] classPath, String[] args, int i) throws IllegalArgumentException
      Computes the path of all included jars
      Throws:
      IllegalArgumentException
    • setOptionEncoding

      protected void setOptionEncoding(String[] args, int i)
    • setOptionAnchor

      protected void setOptionAnchor(String[] args, int i)
    • setOptionFormat

      protected void setOptionFormat(String[] args, int i)
    • collectAllJars

      protected List<String> collectAllJars(String sDir)
    • addToClassPath

      protected String[] addToClassPath(String[] classPath, List<String> tmpPath)
    • readAllJars

      protected List<String> readAllJars(String filename)
      Reads all jar in classpath from a file, one per line
      Parameters:
      filename - of the file containing the jars of the classpath
      Returns:
      the collection of jar paths
    • usage

      protected void usage()
    • setCodeVersion

      protected void setCodeVersion(String arg)
    • getOutputFileName

      public String getOutputFileName()
    • configureJDTParser

      public void configureJDTParser(org.eclipse.jdt.core.dom.ASTParser jdtParser)
    • sourcePathEntries

      protected String[] sourcePathEntries()
    • sourcePathEntryFor

      protected String sourcePathEntryFor(String path)
    • createMatcher

      protected Pattern createMatcher(String expr)
      Creates a regexp matcher form a globbing expression
      Glob to Regexp algorithm from https://stackoverflow.com/questions/1247772/is-there-an-equivalent-of-java-util-regex-for-glob-type-patterns
    • collectJavaFiles

      protected void collectJavaFiles(Collection<String> paths, Collection<String> files)
    • collectJavaFiles

      protected void collectJavaFiles(File f, Collection<String> files)
    • sourceFilesToParse

      protected String[] sourceFilesToParse()
    • withAnchors

      public boolean withAnchors()
    • withAnchors

      public boolean withAnchors(VerveineJOptions.AnchorOptions anchorOption)
    • withLocals

      public boolean withLocals()
    • withDebug

      public boolean withDebug()
    • commentsAsText

      public boolean commentsAsText()
    • isParsingJdk

      public boolean isParsingJdk()
    • getFileEncoding

      public String getFileEncoding()
    • isStrict

      public boolean isStrict()
    • isUseMissingPackage

      public boolean isUseMissingPackage()