public class DefaultShellCallback extends Object implements ShellCallback
| Constructor and Description |
|---|
DefaultShellCallback(boolean overwrite) |
| Modifier and Type | Method and Description |
|---|---|
File |
getDirectory(String targetProject,
String targetPackage)
This method is called to ask the shell to resolve a project/package combination into a directory on the file
system.
|
boolean |
isOverwriteEnabled()
Return true if the generator should overwrite an existing file if one exists.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisMergeSupported, mergeJavaFile, refreshProjectpublic File getDirectory(String targetProject, String targetPackage) throws ShellException
ShellCallbackThe returned java.io.File object:
The default shell callback interprets both values as directories and simply concatenates the two values to generate the default directory.
getDirectory in interface ShellCallbacktargetProject - the target projecttargetPackage - the target packageShellException - if the project/package cannot be resolved into a directory on the file system. In this case, the
generator will not save the file it is currently working on. The generator will add the exception
message to the list of warnings automatically.public boolean isOverwriteEnabled()
ShellCallbackisMergeSupported()
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.isOverwriteEnabled in interface ShellCallbackCopyright © 2006–2025 MyBatis.org. All rights reserved.