|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.templateMerge.MergeTemplate
How do we handle the generation of code for which there is no corresponding data? For example, A package definition, is not mandatory. For collection tokens, all is taken care of this for us (since the enumeration size will be zero). The main entry point for this class is generateForOn. If following the source that is a good place to start. A current design constraint is that a template can only have 1 root object. This doesn't allow the use of InformationTokens that expect different objects as their arguments.
generateForOn(java.lang.Object, java.io.OutputStream)
,
Serialized FormConstructor Summary | |
MergeTemplate()
|
Method Summary | |
void |
addTemplate(MergeTemplate template)
|
void |
body(java.lang.Object ci,
java.io.OutputStream stream,
java.util.Enumeration en)
|
java.lang.StringBuffer |
browseBody()
Return a StringBuffer containing what this template should generate. |
java.lang.StringBuffer |
browseLayoutBuffer(boolean fullView)
Templates can contain other templates. |
void |
generateForOn(java.lang.Object ci,
java.io.OutputStream stream)
SourceCodeGeneration entry point. |
java.lang.String |
getPostBody()
Just a string that should be generated after any sub templates. |
java.lang.String |
getPostFormattedBody()
Gets the PostFormattedBody attribute of the MergeTemplate object |
TagTable |
getPostTagTable()
Gets the PostTagTable attribute of the MergeTemplate object |
InformationToken[] |
getPostTokens()
|
java.lang.String |
getPreBody()
Just a string that should be generated before any sub templates. |
java.lang.String |
getPreFormattedBody()
Gets the PreFormattedBody attribute of the MergeTemplate object |
TagTable |
getPreTagTable()
Gets the PreTagTable attribute of the MergeTemplate object |
InformationToken[] |
getPreTokens()
|
java.lang.String |
getTemplateName()
|
MergeTemplate[] |
getTemplates()
|
java.util.Enumeration |
postWrite(java.lang.Object ci,
java.io.OutputStream stream)
|
java.util.Enumeration |
preWrite(java.lang.Object ci,
java.io.OutputStream stream)
|
void |
setPostBody(java.lang.String body)
|
void |
setPostFormattedBody(java.lang.String body)
Sets the PostFormattedBody attribute of the MergeTemplate object |
void |
setPostTagTable(TagTable tagTable)
Sets the PostTagTable attribute of the MergeTemplate object |
void |
setPostTokens(InformationToken[] toks)
|
void |
setPreBody(java.lang.String body)
|
void |
setPreFormattedBody(java.lang.String body)
Sets the PreFormattedBody attribute of the MergeTemplate object |
void |
setPreTagTable(TagTable tagTable)
Sets the PreTagTable attribute of the MergeTemplate object |
void |
setPreTokens(InformationToken[] toks)
|
void |
setTemplateName(java.lang.String nm)
|
void |
setTemplates(MergeTemplate[] temps)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MergeTemplate()
Method Detail |
public void setPostBody(java.lang.String body)
body
- The new PostBody valuepublic void setPostTokens(InformationToken[] toks)
toks
- The new PostTokens valuepublic void setPreBody(java.lang.String body)
body
- The new PreBody valuepublic void setPreTokens(InformationToken[] toks)
toks
- The new PreTokens valuepublic void setTemplateName(java.lang.String nm)
nm
- The new TemplateName valuepublic void setTemplates(MergeTemplate[] temps)
temps
- The new Templates valuepublic void setPostTagTable(TagTable tagTable)
tagTable
- The new PostTagTable valuepublic void setPreTagTable(TagTable tagTable)
tagTable
- The new PreTagTable valuepublic void setPreFormattedBody(java.lang.String body)
body
- The new PreFormattedBody valuepublic void setPostFormattedBody(java.lang.String body)
body
- The new PostFormattedBody valuepublic java.lang.String getPostBody()
public InformationToken[] getPostTokens()
public java.lang.String getPreBody()
public InformationToken[] getPreTokens()
public java.lang.String getTemplateName()
public MergeTemplate[] getTemplates()
public TagTable getPostTagTable()
public TagTable getPreTagTable()
public java.lang.String getPreFormattedBody()
public java.lang.String getPostFormattedBody()
public void generateForOn(java.lang.Object ci, java.io.OutputStream stream)
ci
- java.lang.Object Provided to information token to sever as the
source of data.stream
- java.io.OutputStream The stream unto which the generated text
will be placed.public void addTemplate(MergeTemplate template)
template
- The feature to be added to the Template attributepublic void body(java.lang.Object ci, java.io.OutputStream stream, java.util.Enumeration en)
ci
- stream
- en
- public java.lang.StringBuffer browseBody()
public java.lang.StringBuffer browseLayoutBuffer(boolean fullView)
fullView
- True if you want sub templates expanded.
public java.util.Enumeration postWrite(java.lang.Object ci, java.io.OutputStream stream)
ci
- stream
-
public java.util.Enumeration preWrite(java.lang.Object ci, java.io.OutputStream stream)
ci
- stream
-
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |