docs: public static Expression transformInlineConstants(final Expression exp, final ClassNode attrType) {
          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() || !(type.isResolved() || type.isPrimaryClassNode()))
                      return exp;
  
                  if (type.isPrimaryClassNode()) {
                      FieldNode fn = type.redirect().getField(pe.getPropertyAsString());
                      if (fn != null && fn.isStatic() && fn.isFinal()) {
                          Expression ce2 = transformInlineConstants(fn.getInitialValueExpression(), attrType);
                          if (ce2 != null) {
                              return ce2;
                          }
                      }
                  } else {
                      try {
                          Field field = type.redirect().getTypeClass().getField(pe.getPropertyAsString());
                          if (field != null && Modifier.isStatic(field.getModifiers()) && Modifier.isFinal(field.getModifiers())) {
                              ConstantExpression ce3 = new ConstantExpression(field.get(null), true);
                              ce3.setSourcePosition(exp);
                              return ce3;
                          }
                      } catch(Exception e) {
                          // ignore, leave property expression in place and we'll report later
                      }
                  }
              }
          } else if (exp instanceof BinaryExpression) {
              ConstantExpression ce = transformBinaryConstantExpression((BinaryExpression) exp, attrType);
              if (ce != null) {
                  return ce;
              }
          } else if (exp instanceof VariableExpression) {
              VariableExpression ve = (VariableExpression) exp;
              if (ve.getAccessedVariable() instanceof FieldNode) {
                  FieldNode fn = (FieldNode) ve.getAccessedVariable();
                  if (fn.isStatic() && fn.isFinal()) {
                      Expression ce = transformInlineConstants(fn.getInitialValueExpression(), attrType);
                      if (ce != null) {
                          return ce;
                      }
                  }
              }
          } else if (exp instanceof ListExpression) {
              return transformListOfConstants((ListExpression) exp, attrType);
          }
          return exp;
      }