|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.objectwave.tools.GenerateTemplateInto
Used to add the method signatures from one class to another class.
| Constructor Summary | |
GenerateTemplateInto()
|
|
| Method Summary | |
protected static java.lang.String[] |
cleanupArgs(java.lang.String[] args)
Sometimes I pass -D arguments on the command line by mistake |
protected java.io.Reader |
createReaderFromClassFile(java.io.File file)
|
void |
generateTemplates(MergeTemplate[] templateName,
java.lang.String targetClassName)
|
void |
generateTemplates(MergeTemplate[] templateName,
java.lang.String targetPackageName,
java.lang.String targetClassName,
java.lang.String fileName)
Generate the templates into the body or header of the target class. |
java.lang.String |
getMiscData()
Gets the MiscData attribute of the GenerateTemplateInto object |
protected java.io.Reader |
getReader(java.lang.String fileName,
java.lang.String targetPackageName)
Return a 'reader' that will be able to read Character values that will be in the form of a valid java source code file. |
protected java.io.Reader |
getReaderForClass(java.lang.Class clazz,
java.lang.String targetPackageName)
Use reflection to create the source necessary to create a new file. |
protected java.io.Reader |
getReaderForClass(java.lang.String className,
java.lang.String targetPackageName)
Use reflection to create the source necessary to create a new file. |
protected JavaClassDef |
getTargetDef(ClassElement[] els,
java.lang.String targetClassName)
|
protected TokenProvider |
getTokenProvider()
|
void |
init(java.lang.String fileName)
Load in the templates from the specified file name. |
void |
initFromXml(java.lang.String xmlFileName)
|
static void |
main(java.lang.String[] args)
Defaults to using JavaClassDef.dat file for template source. |
void |
setInitialized(boolean initialized)
If this is true, ignore any calls to the init methods. |
void |
setMiscData(java.lang.String str)
MiscData is the value used for the %MISC% token in the ClassInformation object. |
protected void |
setTemplates(KnownTemplates temps)
Sets the Templates attribute of the GenerateTemplateInto object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GenerateTemplateInto()
| Method Detail |
public static void main(java.lang.String[] args)
args - java.lang.String[]protected static java.lang.String[] cleanupArgs(java.lang.String[] args)
args -
public void setInitialized(boolean initialized)
initialized - The new Initialized valuepublic void setMiscData(java.lang.String str)
str - The new MiscData valueprotected void setTemplates(KnownTemplates temps)
temps - The new Templates valuepublic java.lang.String getMiscData()
protected java.io.Reader getReaderForClass(java.lang.String className,
java.lang.String targetPackageName)
throws java.io.IOException
className - targetPackageName -
java.io.IOException
protected java.io.Reader getReaderForClass(java.lang.Class clazz,
java.lang.String targetPackageName)
throws java.io.IOException
clazz - targetPackageName -
java.io.IOException
protected java.io.Reader getReader(java.lang.String fileName,
java.lang.String targetPackageName)
throws java.io.IOException,
java.lang.Exception
fileName - targetPackageName -
java.io.IOException
java.lang.ExceptionclassFile.ClassFile
protected JavaClassDef getTargetDef(ClassElement[] els,
java.lang.String targetClassName)
throws java.io.IOException,
java.io.FileNotFoundException
els - targetClassName -
java.io.IOException
java.io.FileNotFoundExceptionprotected TokenProvider getTokenProvider()
public void init(java.lang.String fileName)
throws java.lang.Exception
fileName -
java.lang.Exception
public void generateTemplates(MergeTemplate[] templateName,
java.lang.String targetPackageName,
java.lang.String targetClassName,
java.lang.String fileName)
throws java.io.FileNotFoundException,
java.io.IOException,
java.lang.Exception
templateName - java.lang.StringtargetPackageName - targetClassName - fileName -
java.io.FileNotFoundException
java.io.IOException
java.lang.Exception
public void generateTemplates(MergeTemplate[] templateName,
java.lang.String targetClassName)
throws java.io.FileNotFoundException,
java.io.IOException
templateName - targetClassName -
java.io.FileNotFoundException
java.io.IOException
public void initFromXml(java.lang.String xmlFileName)
throws java.net.MalformedURLException,
ConfigurationException,
java.io.IOException
xmlFileName -
java.net.MalformedURLException
ConfigurationException
java.io.IOException
protected java.io.Reader createReaderFromClassFile(java.io.File file)
throws java.io.IOException,
java.lang.Exception
file -
java.io.IOException
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||