public static class CompilationUnit.Storage extends Object
Modifier and Type | Method and Description |
---|---|
CompilationUnit |
getCompilationUnit() |
Path |
getDirectory() |
Charset |
getEncoding() |
String |
getFileName() |
Path |
getPath() |
Path |
getSourceRoot() |
ParseResult<CompilationUnit> |
reparse(JavaParser javaParser) |
void |
save()
Saves the compilation unit to its original location
|
void |
save(Function<CompilationUnit,String> makeOutput)
Saves a compilation unit to its original location with formatting according to the function passed as a
parameter.
|
void |
save(Function<CompilationUnit,String> makeOutput,
Charset encoding)
Saves a compilation unit to its original location with formatting and encoding according to the function and
encoding passed as a parameter.
|
public Path getPath()
public CompilationUnit getCompilationUnit()
public Charset getEncoding()
public Path getSourceRoot()
public String getFileName()
public Path getDirectory()
public void save()
public void save(Function<CompilationUnit,String> makeOutput)
makeOutput
- a function that formats the compilation unitpublic void save(Function<CompilationUnit,String> makeOutput, Charset encoding)
makeOutput
- a function that formats the compilation unitencoding
- the encoding to use for the saved filepublic ParseResult<CompilationUnit> reparse(JavaParser javaParser)
Copyright © 2007–2019. All rights reserved.