Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FE667DFE for ; Sun, 16 Oct 2011 17:36:35 +0000 (UTC) Received: (qmail 23004 invoked by uid 500); 16 Oct 2011 17:36:35 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 22955 invoked by uid 500); 16 Oct 2011 17:36:35 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 22944 invoked by uid 99); 16 Oct 2011 17:36:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Oct 2011 17:36:35 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Oct 2011 17:36:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C174C30A649 for ; Sun, 16 Oct 2011 17:36:11 +0000 (UTC) Date: Sun, 16 Oct 2011 17:36:11 +0000 (UTC) From: "Simone Tripodi (Commented) (JIRA)" To: issues@commons.apache.org Message-ID: <130869045.18591.1318786571793.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <829172049.17510.1318703594215.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (OGNL-27) Move "toString" implementations into visitor pattern. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OGNL-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128459#comment-13128459 ] Simone Tripodi commented on OGNL-27: ------------------------------------ Thanks a lot Daniel, I'm processing it right now! > Move "toString" implementations into visitor pattern. > ----------------------------------------------------- > > Key: OGNL-27 > URL: https://issues.apache.org/jira/browse/OGNL-27 > Project: OGNL > Issue Type: New Feature > Reporter: Daniel Pitts > Attachments: to_string_visitor1.patch, to_string_visitor2.patch, to_string_visitor_with_style_recommendations.patch > > > Using the Visitor pattern allows for a cleaner implementation of toString(). > I have a patch which will remove toString() from all AST classes, and replace it with a single toString() in "SimpleNode" which delegates to a ToStringVisitor to build the String efficiently. > This patch can also be used as an example of how to move other business logic out of the AST classes into their own visitor classes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira