public class SourceRoot extends Object
Constructor and Description |
---|
SourceRoot(Path root) |
Modifier and Type | Method and Description |
---|---|
void |
add(String pkg,
String filename,
CompilationUnit compilationUnit)
Add a newly created Java file to this source root.
|
Map<Path,CompilationUnit> |
getContent()
The Java files that have been parsed by this source root object.
|
List<Problem> |
getProblems()
A complete list of encountered problems while parsing.
|
Map<Path,CompilationUnit> |
parse(JavaParser parser)
Parse every Java file in this source root.
|
Map<Path,CompilationUnit> |
parse(String startPackage,
JavaParser parser)
Parses a package recursively.
|
Optional<CompilationUnit> |
parse(String packag,
String filename,
JavaParser javaParser)
Parse a single Java file and return it.
|
void |
saveAll()
Save all files back to where they were found.
|
void |
saveAll(Path root)
Save all files back to another path.
|
public SourceRoot(Path root)
public Map<Path,CompilationUnit> parse(String startPackage, JavaParser parser) throws IOException
IOException
public Map<Path,CompilationUnit> parse(JavaParser parser) throws IOException
IOException
public void saveAll() throws FileNotFoundException, UnsupportedEncodingException
public void saveAll(Path root) throws FileNotFoundException, UnsupportedEncodingException
public List<Problem> getProblems()
public Map<Path,CompilationUnit> getContent()
public Optional<CompilationUnit> parse(String packag, String filename, JavaParser javaParser) throws IOException
IOException
public void add(String pkg, String filename, CompilationUnit compilationUnit)
Copyright © 2007–2017. All rights reserved.