|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.tool.common.Replacement
The replacement class defines a search and replace operation for updating source code that was copied from a template file. Replacement object are used by the predefined generators to insert things like application and package names into java source files.
Constructor Summary | |
Replacement(java.lang.String inFind,
java.lang.String inReplaceWith)
Define a replacement operation using a single replacement string. |
|
Replacement(java.lang.String inFind,
java.lang.String[] inReplaceWith)
Define a replacement operation using an replacement array. |
Method Summary | |
java.lang.String |
getFind()
Get the string to search for. |
java.lang.String[] |
getReplaceWith()
Get replacement text that can be a one or more stings. |
void |
setReplaceWith(java.lang.String with)
Set the replaceWith to a single string value. |
void |
setReplaceWith(java.lang.String[] with)
Set the replaceWith to an array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Replacement(java.lang.String inFind, java.lang.String[] inReplaceWith) throws ToolException
GenerationException
- Thrown if either parameter is null, or the find element is an empty string
or if the replaceWith array has a length of zero.
ToolException
public Replacement(java.lang.String inFind, java.lang.String inReplaceWith) throws ToolException
GenerationException
- Thrown if either parameter is null or either element references
an empty string.
ToolException
Method Detail |
public java.lang.String getFind()
public java.lang.String[] getReplaceWith()
public void setReplaceWith(java.lang.String[] with)
with
- One or more strings to use as a replacement for the find string. If
the array contains more than one string, a new line is inserted for
each element of the replaceWith array.public void setReplaceWith(java.lang.String with)
with
- String to use as a replacement for the find string.
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |