Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-17

Support @ as a new operation via BinaryOperation for accessing fields

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-JSR-2
    • lexer
    • None

    Description

      This would allow tree structures to be used in an XPath kinda way. e.g. if you had a tree of nodes you could do

      node.@x

      to refer to an attribute rather than

      node.x

      which can refer to children.

      Then Groovy would have similar operations to XPath

      Similarly @x could be used too.

      This would also allow fields to be explicitly referenced as opposed to properties. e.g. something.@foo if something is a friend/in same package etc.

      Attachments

        Issue Links

          Activity

            People

              guillaume Guillaume Sauthier
              jstrachan James Strachan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: