[jira] [Created] (OGNL-24) Support visitor pattern on AST

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
Support visitor pattern on AST
------------------------------

                 Key: OGNL-24
                 URL: https://issues.apache.org/jira/browse/OGNL-24
             Project: OGNL
          Issue Type: New Feature
            Reporter: Daniel Pitts


Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.

Patch to be attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Pitts updated OGNL-24:
-----------------------------

    Attachment: visitor-pattern.patch

This patch adds complete visitor support.

> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114461#comment-13114461 ]

Adrian Crum commented on OGNL-24:
---------------------------------

If the object doing the visiting isn't going to do anything with the data parameter, then there is no need to include it in the accept method's parameter list. So, instead of

{code}

public <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor, P data) {
    return visitor.visit(this, data);
}

{code}

use

{code}

public <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor) {
    return visitor.visit(this);
}

{code}

or better

{code}

public <R,P> void accept(NodeVisitor<? extends R, ? super P> visitor) {
    visitor.visit(this);
}

{code}


> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114462#comment-13114462 ]

Adrian Crum commented on OGNL-24:
---------------------------------

Also, there is no need to include the public keyword in interface method declarations.


> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114470#comment-13114470 ]

Daniel Pitts commented on OGNL-24:
----------------------------------

What makes you think the visitor isn't going to do anything with the
data object? It is provided to support flyweight visitors to
manipulate some structure, among other potential uses.

Thanks,
Daniel.

Sent from my iPhone




> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114482#comment-13114482 ]

Adrian Crum commented on OGNL-24:
---------------------------------

Agreed - the extra parameter would be needed for flyweight visitors.


> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119440#comment-13119440 ]

Daniel Pitts commented on OGNL-24:
----------------------------------

Any committer willing to look at this?
               

> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
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

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119533#comment-13119533 ]

Simone Tripodi commented on OGNL-24:
------------------------------------

Contributions are reviewed as soon as some of us get a good slot of spare time to review, unfortunately no one of us is fulltime on OSS - I personally would like to do it!
               

> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
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

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123681#comment-13123681 ]

Christian Grobmeier commented on OGNL-24:
-----------------------------------------

Thanks very much Daniel, I have just applied it. Looks very good.

By the way, we welcome testcases as well :-). I expect that we will use the visitor pretty soon, so I have applied it anyway. But if you like, feel free.
               

> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
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

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Grobmeier resolved OGNL-24.
-------------------------------------

    Resolution: Fixed

committed with rv1180607, thanks for your contributions Daniel and Adrian.
               

> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
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

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OGNL-24) Support visitor pattern on AST

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/OGNL-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123684#comment-13123684 ]

Hudson commented on OGNL-24:
----------------------------

Integrated in ognl #130 (See [https://builds.apache.org/job/ognl/130/])
    OGNL-24: applied patch from Daniel Pitts to support visitor pattern - thanks!

grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1180607
Files :
* /commons/proper/ognl/trunk/src/changes/changes.xml
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTAdd.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTAnd.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTAssign.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTBitAnd.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTBitNegate.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTBitOr.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTChain.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTConst.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTCtor.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTDivide.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTEq.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTEval.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTGreater.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTGreaterEq.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTIn.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTInstanceof.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTKeyValue.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTLess.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTLessEq.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTList.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMap.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMethod.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTMultiply.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTNegate.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTNot.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTNotEq.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTNotIn.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTOr.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTProject.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTProperty.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTRemainder.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTRootVarRef.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelect.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelectFirst.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSelectLast.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSequence.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTShiftLeft.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTShiftRight.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticField.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTStaticMethod.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTSubtract.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTTest.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTThisVarRef.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTUnsignedShiftRight.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTVarRef.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTXor.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Node.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/NodeVisitor.java

               

> Support visitor pattern on AST
> ------------------------------
>
>                 Key: OGNL-24
>                 URL: https://issues.apache.org/jira/browse/OGNL-24
>             Project: OGNL
>          Issue Type: New Feature
>            Reporter: Daniel Pitts
>         Attachments: visitor-pattern.patch
>
>
> Supporting the visitor pattern on the AST tree allows for more modular support of features and easier refactoring in the future.
> Patch to be attached.

--
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