|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ibatis.abator.internal.DefaultShellCallback
public class DefaultShellCallback
| Constructor Summary | |
|---|---|
DefaultShellCallback(boolean overwrite)
|
|
| Method Summary | |
|---|---|
java.io.File |
getDirectory(java.lang.String targetProject,
java.lang.String targetPackage,
java.util.List warnings)
Abator will call this method to ask the shell to resolve a project/package combination into a directory on the file system. |
java.lang.String |
mergeJavaFile(GeneratedJavaFile newFile,
java.lang.String javadocTag,
java.util.List warnings)
Abator will call this method if a newly generated Java file would overwrite an existing file. |
boolean |
mergeSupported()
Return true if the callback supports Java merging, otherwise false. |
void |
refreshProject(java.lang.String project)
After all files are saved to the file system, Abator will call this method once for each unique project that was affected by the generation run. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultShellCallback(boolean overwrite)
| Method Detail |
|---|
public java.io.File getDirectory(java.lang.String targetProject,
java.lang.String targetPackage,
java.util.List warnings)
throws ShellException
ShellCallbackjava.io.File object:
getDirectory in interface ShellCallbackShellException - if the project/package cannot be resolved into
a directory on the file system. In this case, Abator will not save the
file it is currently working on. Abator
will add the exception message to the list of warnings automatically.
public java.lang.String mergeJavaFile(GeneratedJavaFile newFile,
java.lang.String javadocTag,
java.util.List warnings)
throws ShellException
ShellCallbacknewFile.getFormattedContent().
However, this will overwrite any modifications to the generated files.
mergeJavaFile in interface ShellCallbacknewFile - the newly generated Java filejavadocTag - the JavaDoc tag that denotes which methods and fields in the
old file to delete (all new methods and fields will also include
this tag)warnings - Any warning strings during the merge can be added to this list.
Adding a warning will not stop Abator from saving the resulting
source.
ShellException - if the file cannot be merged for some reason. If this
exception is thrown, Abator will not save anything and
the existing file will remain undisturbed. Abator
will add the exception message to the list of warnings automatically.public void refreshProject(java.lang.String project)
ShellCallback
refreshProject in interface ShellCallbackproject - the project to be refreshedpublic boolean mergeSupported()
ShellCallbackmergeJavaFile method if this method
returns true;
mergeSupported in interface ShellCallback
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||