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

Allow 'class' to be used as a special variable inside expressions or as a named parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-1
    • parser
    • None

    Description

      I'd like 'class' to be a special variable like 'this' and 'super' when used inside an expression or named parameter call.

      e.g.

      class Foo {
      log = Log.newInstance(class)

      static main(String[] args)

      { class.newInstance().run() }

      }

      or when used with GroovyMarkup...

      builder = new BeanBuilder()
      bean = builder.bean(class:Customer) {
      address(city:'London')
      name('James')
      }

      Attachments

        Activity

          People

            bob Bob Paulin
            jstrachan James Strachan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: