DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=35588>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35588 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15662|0 |1 is obsolete| | ------- Additional Comments From [EMAIL PROTECTED] 2005-08-06 18:33 ------- Created an attachment (id=15933) --> (http://issues.apache.org/bugzilla/attachment.cgi?id=15933&action=view) New implementation of VariableFormatter This patch contains some modifications of VariableFormatter with the purpose to make the code easier to understand and more integrated into the rest of the text package. The main idea of this patch is to separate the logic for detecting variables from the processing of variables. There is now a new nested class VariableParser, which scans the input data for text and variable tokens. This class is used in the main interpolation method and called in a loop to obtain all tokens and process them according to their type. This approach IMO makes customization of this class easier. ATM the involved helper classes and methods are protected allowing a sub class to override some of them. This way e.g. completely different mechanisms for detecting variables or escaping could be implemented. If you think that the API becomes too complex, the involved classes and methods could be made private. There are the following further modifications and improvements: - The main interpolation method now operates on a char[] and can therefor easier be used from other classes in this package. - StrTokenizer.Matcher is used for detecting variable tokens. This is a "natural" way of dealing with char[]. - The escaping mechanism can now be implemented much easier. No need for escape() and unescape() methods or for escaping variable end tokens. - StrBuilder is used internally for constructing result strings instead of StringBuffer. WDYT? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
