public class SourceZip extends Object
Constructor and Description |
---|
SourceZip(Path zipPath)
Create a new ZIP parser.
|
SourceZip(Path zipPath,
ParserConfiguration configuration)
Create a new ZIP parser.
|
Modifier and Type | Method and Description |
---|---|
JavaParser |
getJavaParser()
Get the parser used for parsing.
|
Path |
getZipPath()
Get the path of the ZIP file to be parsed.
|
List<Pair<Path,ParseResult<CompilationUnit>>> |
parse()
Tries to parse all '.java' files in the ZIP located at this SourceZip's path and returns the parse
results in a list.
|
SourceZip |
setJavaParser(JavaParser javaParser)
Set the parser that is used for parsing.
|
public SourceZip(Path zipPath)
JavaParser
with the default ParserConfiguration
will be
used to parse the ZIP.zipPath
- The absolute path of ZIP file to parse.public SourceZip(Path zipPath, ParserConfiguration configuration)
JavaParser
with the given configuration will be used to parse
the ZIP.zipPath
- The absolute path of ZIP file to parse.configuration
- The configuration to initiate the default parser with.public List<Pair<Path,ParseResult<CompilationUnit>>> parse() throws IOException
{@link
- IOException} If an error occurs while trying to parse the given source.IOException
public Path getZipPath()
public JavaParser getJavaParser()
public SourceZip setJavaParser(JavaParser javaParser)
javaParser
- The parser to use.Copyright © 2007–2017. All rights reserved.