Package org.mybatis.generator.api
Class GeneratedFile
java.lang.Object
org.mybatis.generator.api.GeneratedFile
- Direct Known Subclasses:
GeneratedJavaFile,GeneratedKotlinFile,GeneratedXmlFile
Abstract class that holds information common to all generated files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringabstract StringGet the file name (without any path).abstract StringReturns the entire contents of the generated file.abstract StringGet the target package for the file.Gets the target project.abstract booleanChecks if is mergeable.toString()
-
Field Details
-
targetProject
-
-
Constructor Details
-
GeneratedFile
-
-
Method Details
-
getFormattedContent
Returns the entire contents of the generated file. Clients can simply save the value returned from this method as the file contents. Subclasses such as @see org.mybatis.generator.api.GeneratedJavaFile offer more fine grained access to file parts, but still implement this method in the event that the entire contents are desired.- Returns:
- Returns the content.
-
getFileName
Get the file name (without any path). Clients should use this method to determine how to save the results.- Returns:
- Returns the file name.
-
getTargetProject
Gets the target project. Clients can call this method to determine how to save the results.- Returns:
- the target project
-
getTargetPackage
Get the target package for the file. Clients should use this method to determine how to save the results.- Returns:
- Returns the target project.
-
toString
-
isMergeable
public abstract boolean isMergeable()Checks if is mergeable.- Returns:
- true, if is mergeable
-
getFileEncoding
-