com.objectwave.sourceModel
Class TagReplace

java.lang.Object
  |
  +--com.objectwave.sourceModel.TagReplace

public class TagReplace
extends java.lang.Object

Title: Description: Copyright: Copyright (c) 2001 Company:

Version:
$Id: TagReplace.java,v 2.1 2002/03/23 14:03:00 dave_hoag Exp $
Author:
dhoag

Nested Class Summary
static class TagReplace.Test
          Unit tests for TagReplace
 
Field Summary
static java.lang.String TAG_MARK
           
 
Constructor Summary
TagReplace()
          Constructor for the TagReplace object
TagReplace(java.lang.String body, JavaClassDef classDef, TagTable tagTable)
          Constructor for the TagReplace object
 
Method Summary
protected  java.util.Enumeration getExpressionValue(TagElement tag)
          Gets the ExpressionValue attribute of the TagReplace object
protected  java.util.Enumeration getOWValue(TagElement tag)
          Gets the OWValue attribute of the TagReplace object
protected  java.util.Enumeration getTagValue(TagElement tag)
          Gets the TagValue attribute of the TagReplace object
protected  void init()
           
static void main(java.lang.String[] args)
          args[0] TemplateName args[1] TemplateFile args[2] SourceFile
protected  java.lang.String replaceAllTag()
           
protected  java.lang.String replaceTagWith(java.lang.String onePass, int i, java.lang.String value)
          used to replace an tag with a value.
protected  void setAllTagValues()
          Sets the AllTagValues attribute of the TagReplace object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_MARK

public static final java.lang.String TAG_MARK
Constructor Detail

TagReplace

public TagReplace()
Constructor for the TagReplace object


TagReplace

public TagReplace(java.lang.String body,
                  JavaClassDef classDef,
                  TagTable tagTable)
Constructor for the TagReplace object

Parameters:
body -
classDef -
tagTable -
Method Detail

main

public static void main(java.lang.String[] args)
args[0] TemplateName args[1] TemplateFile args[2] SourceFile

Parameters:
args - The command line arguments

setAllTagValues

protected void setAllTagValues()
Sets the AllTagValues attribute of the TagReplace object


getTagValue

protected java.util.Enumeration getTagValue(TagElement tag)
Gets the TagValue attribute of the TagReplace object

Parameters:
tag -
Returns:
The TagValue value

getOWValue

protected java.util.Enumeration getOWValue(TagElement tag)
Gets the OWValue attribute of the TagReplace object

Parameters:
tag -
Returns:
The OWValue value

getExpressionValue

protected java.util.Enumeration getExpressionValue(TagElement tag)
Gets the ExpressionValue attribute of the TagReplace object

Parameters:
tag -
Returns:
The ExpressionValue value

init

protected void init()
             throws java.lang.ClassNotFoundException,
                    java.lang.IllegalAccessException,
                    java.lang.InstantiationException
Throws:
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException

replaceAllTag

protected java.lang.String replaceAllTag()
Returns:

replaceTagWith

protected java.lang.String replaceTagWith(java.lang.String onePass,
                                          int i,
                                          java.lang.String value)
used to replace an tag with a value.

Parameters:
onePass - String The current String need to be processed
i - int The current offset in the String onePass
value - String The value should replace the tag
Returns:
String the replaced String