code: private Expression transformInlineConstants(Expression exp) {
          if (exp instanceof PropertyExpression) {
              PropertyExpression pe = (PropertyExpression) exp;
              if (pe.getObjectExpression() instanceof ClassExpression) {
                  ClassExpression ce = (ClassExpression) pe.getObjectExpression();
                  ClassNode type = ce.getType();
                  if (type.isEnum())
                      return exp;
  
                  FieldNode fn = type.getField(pe.getPropertyAsString());
                  if (fn != null && !fn.isEnum() && fn.isStatic() && fn.isFinal()) {
                      if (fn.getInitialValueExpression() instanceof ConstantExpression) {
                          return fn.getInitialValueExpression();
                      }
                  }
              }
          } else if (exp instanceof ListExpression) {
              ListExpression le = (ListExpression) exp;
              ListExpression result = new ListExpression();
              for (Expression e : le.getExpressions()) {
                  result.addExpression(transformInlineConstants(e));
              }
              return result;
          } else if (exp instanceof AnnotationConstantExpression) {
              ConstantExpression ce = (ConstantExpression) exp;
              if (ce.getValue() instanceof AnnotationNode) {
                  // replicate a little bit of AnnotationVisitor here
                  // because we can't wait until later to do this
                  AnnotationNode an = (AnnotationNode) ce.getValue();
                  for (Map.Entry<String, Expression> member : an.getMembers().entrySet()) {
                      member.setValue(transformInlineConstants(member.getValue()));
                  }
  
              }
          }
          return exp;
      }
docs: resolve constant-looking expressions statically (do here as gets transformed away later)