|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.sourceGenerator.ClassBodyGenerator
Manipulates java class info objects to include the various methods generated via the templates. This class is only capable of generating a template and adding those class elements to a JavaClassInfo object. This functionality is good for attributes, inner Classes, methods, static initializers ....
Constructor Summary | |
ClassBodyGenerator(JavaClassInfo anInfo)
|
Method Summary | |
void |
generateBody(java.lang.String tempName,
ClassSpec aSpec)
|
void |
generateClose(java.lang.String tempName,
ClassSpec aSpec,
boolean overwrite)
Generate the supplied template. |
void |
generateHeader(MergeTemplate temp,
ClassSpec aSpec)
Generate the supplied template. |
void |
generateHeader(java.lang.String tempName,
ClassSpec aSpec)
Generate the supplied template. |
void |
generateStubs(MethodDef[] els,
boolean overwrite)
This can be used to basically 'clone' a class. |
void |
generateTemplate(MergeTemplate template,
boolean overwrite)
|
void |
generateTemplate(MergeTemplate temp,
ClassSpec aSpec,
boolean overwrite)
Generate the supplied template. |
void |
generateTemplate(java.lang.String tempName)
|
void |
generateTemplate(java.lang.String tempName,
boolean overwrite)
This is expecting that the template in question will generate a method. |
void |
generateTemplate(java.lang.String tempName,
ClassSpec aSpec)
Generate the supplied template. |
void |
generateTemplate(java.lang.String tempName,
ClassSpec aSpec,
boolean overwrite)
Generate the supplied template. |
java.util.Vector |
getGeneratedElements(java.lang.String tempName,
ClassSpec aSpec)
Generate the code, but don't update the object. |
protected java.io.StringReader |
getGeneratedSourceReader(java.lang.String tempName,
ClassSpec aSpec)
This method will not instantiate an output stream. |
java.lang.String |
getMiscData()
|
void |
setMiscData(java.lang.String val)
|
void |
setRemoveMode(boolean aValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassBodyGenerator(JavaClassInfo anInfo)
anInfo
- Method Detail |
public void setMiscData(java.lang.String val)
val
- The new MiscData valuepublic void setRemoveMode(boolean aValue)
aValue
- The new RemoveMode valuepublic java.util.Vector getGeneratedElements(java.lang.String tempName, ClassSpec aSpec)
tempName
- aSpec
-
public java.lang.String getMiscData()
public void generateBody(java.lang.String tempName, ClassSpec aSpec)
tempName
- aSpec
- public void generateClose(java.lang.String tempName, ClassSpec aSpec, boolean overwrite) throws java.io.IOException
tempName
- Name of MergeTemplate to generate.aSpec
- The 'class' to use for information while generating the
template. it is important to note, however, that the actual changes
will occur on the class provided when this class was created.overwrite
- If true, overwrite class elements with the same signature.
java.io.IOException
classBuilder.sourceGeneration.MergeTemplate
,
#generateMethodHeader
public void generateHeader(java.lang.String tempName, ClassSpec aSpec)
tempName
- Name of SourceCodeTemplate to generate.aSpec
- public void generateHeader(MergeTemplate temp, ClassSpec aSpec)
temp
- The MergeTemplate to generate.aSpec
- The 'class' to use for information while generating the
template. it is important to note, however, that the actual changes
will occur on the class provided when this class was created.com.objectwave.sourceModel.MergeTemplate
,
#generateMethodBody
,
#generateMethodClose
public void generateStubs(MethodDef[] els, boolean overwrite)
els
- overwrite
- public void generateTemplate(MergeTemplate template, boolean overwrite) throws java.io.IOException
template
- overwrite
-
java.io.IOException
public void generateTemplate(java.lang.String tempName) throws java.io.IOException
tempName
-
java.io.IOException
public void generateTemplate(java.lang.String tempName, ClassSpec aSpec) throws java.io.IOException
tempName
- Name of MergeTemplate to generate.aSpec
- The 'class' to use for information while generating the
template. it is important to note, however, that the actual changes
will occur on the class provided when this class was created.
java.io.IOException
classBuilder.sourceGeneration.MergeTemplate
public void generateTemplate(java.lang.String tempName, ClassSpec aSpec, boolean overwrite) throws java.io.IOException
tempName
- Name of MergeTemplate to generate.aSpec
- overwrite
-
java.io.IOException
public void generateTemplate(MergeTemplate temp, ClassSpec aSpec, boolean overwrite) throws java.io.IOException
temp
- The MergeTemplate to generate.aSpec
- The 'class' to use for information while generating the
template. it is important to note, however, that the actual changes
will occur on the class provided when this class was created.overwrite
-
java.io.IOException
classBuilder.sourceGeneration.MergeTemplate
public void generateTemplate(java.lang.String tempName, boolean overwrite) throws java.io.IOException
tempName
- overwrite
-
java.io.IOException
protected java.io.StringReader getGeneratedSourceReader(java.lang.String tempName, ClassSpec aSpec)
tempName
- aSpec
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |