ariba.util.io
Class TaggedStringProcessor
java.lang.Object
ariba.util.io.TaggedStringProcessor
- Direct Known Subclasses:
- TemplateParser
public class TaggedStringProcessor
- extends 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
TagDelimiter
public static final String TagDelimiter
- See Also:
- Constant Field Values
BeginArgsChar
public static final String BeginArgsChar
- See Also:
- Constant Field Values
EndArgsChar
public static final String EndArgsChar
- See Also:
- Constant Field Values
ArgsSeparator
public static final String ArgsSeparator
- See Also:
- Constant Field Values
TaggedStringProcessor
public TaggedStringProcessor(TagHandler handler)
processString
public String processString(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 String processString(String string,
FastStringBuffer userBuf,
List args)
method
public String method(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 List arguments(String tag,
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-2009 Ariba, Inc. All Rights Reserved.