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.
- Author:
- Jeff Butler
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
abstract String
Get the file name (without any path).abstract String
Returns the entire contents of the generated file.abstract String
Get the target package for the file.Gets the target project.abstract boolean
Checks 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
-