public class GeneratedJavaFile extends GeneratedFile
targetProject
Constructor and Description |
---|
GeneratedJavaFile(CompilationUnit compilationUnit,
String targetProject,
JavaFormatter javaFormatter)
Instantiates a new generated java file.
|
GeneratedJavaFile(CompilationUnit compilationUnit,
String targetProject,
String fileEncoding,
JavaFormatter javaFormatter)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
CompilationUnit |
getCompilationUnit()
This method is required by the Eclipse Java merger.
|
String |
getFileEncoding()
Gets the file encoding.
|
String |
getFileName()
Get the file name (without any path).
|
String |
getFormattedContent()
Returns the entire contents of the generated file.
|
String |
getTargetPackage()
Get the target package for the file.
|
boolean |
isMergeable()
A Java file is mergeable if the getCompilationUnit() method returns a valid compilation unit.
|
getTargetProject, toString
public GeneratedJavaFile(CompilationUnit compilationUnit, String targetProject, String fileEncoding, JavaFormatter javaFormatter)
compilationUnit
- the compilation unittargetProject
- the target projectfileEncoding
- the file encodingjavaFormatter
- the java formatterpublic GeneratedJavaFile(CompilationUnit compilationUnit, String targetProject, JavaFormatter javaFormatter)
compilationUnit
- the compilation unittargetProject
- the target projectjavaFormatter
- the java formatterpublic String getFormattedContent()
GeneratedFile
getFormattedContent
in class GeneratedFile
public String getFileName()
GeneratedFile
getFileName
in class GeneratedFile
public String getTargetPackage()
GeneratedFile
getTargetPackage
in class GeneratedFile
public CompilationUnit getCompilationUnit()
public boolean isMergeable()
isMergeable
in class GeneratedFile
public String getFileEncoding()
Copyright © 2006–2018 MyBatis.org. All rights reserved.