java.lang.Object | |
↳ | org.mybatis.generator.internal.DefaultShellCallback |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is called to ask the shell to resolve a
project/package combination into a directory on the file system.
| |||||||||||
Return true if the callback supports Java merging, otherwise false.
| |||||||||||
Return true if the generator should overwrite an existing file if one exists.
| |||||||||||
This method is called if a newly generated Java file would
overwrite an existing file.
| |||||||||||
After all files are saved to the file system, this method is called
once for each unique project that was affected by the generation
run.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
This method is called to ask the shell to resolve a
project/package combination into a directory on the file system.
This method is called repeatedly (once for each generated file), so it
would be wise for an implementing class to cache results.
The returned java.io.File
object:
ShellException |
---|
Return true if the callback supports Java merging, otherwise false.
The mergeJavaFile()
method will be called only if this
method returns true
.
Return true if the generator should overwrite an existing file if one exists.
This method will be called only if isMergeSupported()
returns false
and a file exists that would be overwritten by
a generated file. If you return true
, then we will log a
warning specifying what file was overwritten.
This method is called if a newly generated Java file would overwrite an existing file. This method should return the merged source (formatted). The generator will write the merged source as-is to the file system. A merge typically follows these steps:
true
from
isMergeSupported()
.newFileSource | the source of the newly generated Java file |
---|---|
existingFileFullPath | the fully qualified path name of the existing Java file |
javadocTags | the JavaDoc tags that denotes which methods and fields in the old file to delete (if the Java element has any of these tags, the element is eligible for merge) |
ShellException |
---|
After all files are saved to the file system, this method is called once for each unique project that was affected by the generation run. This method is useful if your IDE needs to be informed that file system objects have been created or updated. If you are running outside of an IDE, your implementation need not do anything in this method.
project | the project to be refreshed |
---|