ariba.util.io
Class TaggedStringProcessor
java.lang.Object
ariba.util.io.TaggedStringProcessor
- Direct Known Subclasses:
- TemplateParser
public class TaggedStringProcessor
- extends java.lang.Object
A TaggedStringProcessor processes a string that contains "tags", i.e.
substrings delimited by a special sequence of characters. For each tag
it finds in the string, it calls its TagHandler with the tag string and
replaces the tag string (including the delimeters) with the result.
- See Also:
TagHandler
Method Summary |
static java.util.List |
arguments(java.lang.String tag,
java.util.List args)
Given a tag string that in the form of a method with arguments,
returns an array containing the argument strings. |
java.lang.String |
method(java.lang.String tag)
Given a tag string that in the form of a method with arguments,
returns the portion of the tag that's the method name. |
java.lang.String |
processString(java.lang.String string)
Given a line of text string, process all the tags that it find in this
line. |
java.lang.String |
processString(java.lang.String string,
FastStringBuffer userBuf,
java.util.List args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TagDelimiter
public static final java.lang.String TagDelimiter
- See Also:
- Constant Field Values
BeginArgsChar
public static final java.lang.String BeginArgsChar
- See Also:
- Constant Field Values
EndArgsChar
public static final java.lang.String EndArgsChar
- See Also:
- Constant Field Values
ArgsSeparator
public static final java.lang.String ArgsSeparator
- See Also:
- Constant Field Values
TaggedStringProcessor
public TaggedStringProcessor(TagHandler handler)
processString
public java.lang.String processString(java.lang.String string)
- Given a line of text string, process all the tags that it find in this
line. It returns the processed string.
There are two flavors of processString(), one which accepts an existing
FastStringBuffer and arguments List created by the caller and one which
creates one on the fly as needed. These aren't currently cached to
avoid synchronization overhead. The second interface is provided for
users making heavy use of this routine for batch processing to avoid
object creation overhead.
processString
public java.lang.String processString(java.lang.String string,
FastStringBuffer userBuf,
java.util.List args)
method
public java.lang.String method(java.lang.String tag)
- Given a tag string that in the form of a method with arguments,
returns the portion of the tag that's the method name.
arguments
public static java.util.List arguments(java.lang.String tag,
java.util.List args)
- Given a tag string that in the form of a method with arguments,
returns an array containing the argument strings.
AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.