FieldDeclaration.getConstantValue() doesn't return anything

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 5.0
    • Affects Version/s: 5.0
    • Component/s: tools
    • apt
    • b43
    • generic
    • generic

      Using code snippet below in an ANnotationProcessor, null is always returned.

      static class testClassVisitor extends SimpleDeclarationVisitor {
        public void visitFieldDeclaration(FieldDeclaration d) {
          if (d.getConstantValue() != null)
      System.out.println(d.getSimpleName()+ " = " + d.getConstantValue().toString() );
        }
      }
      ###@###.### 2004-03-04

            Assignee:
            Scott Seligman (Inactive)
            Reporter:
            Steve Sides (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: