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

static access vs. Class access (conflicts)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 1.0-beta-6, 1.0-beta-7, 1.0-beta-8, 1.0-beta-9, 1.0-beta-10
    • 1.0-JSR-2
    • None
    • None
    • mac os X 10.3.3

    Description

      There is a conflict between access to static members and the Class object of a class.

      For example:

      class A {
      static methods = "hello there"
      }

      println A.methods

      This actually calls A.getClass().getMethods() and returns:

      [Ljava.lang.reflect.Method;@4eff2c

      On the other hand, if we give static members priority, how do we actually get the Class behavior since we access A's class with just plain "A".

      I don't believe static access and Class access can use the same syntax...

      Attachments

        Activity

          People

            phkim Kim, Pilho
            johnstump John Stump
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: