docs: @SuppressWarnings("unchecked")
      private <T> T allowStaticAccessToMember(T member, boolean staticOnly) {
          if (member == null) return null;
          if (!staticOnly) return member;
          boolean isStatic;
          if (member instanceof Variable) {
              Variable v = (Variable) member;
              isStatic = Modifier.isStatic(v.getModifiers());
          } else if (member instanceof List) {
              List<MethodNode> list = (List<MethodNode>) member;
              if (list.size() == 1) {
                  return (T) Collections.singletonList(allowStaticAccessToMember(list.get(0), staticOnly));
              }
              return (T) Collections.emptyList();
          } else {
              MethodNode mn = (MethodNode) member;
              isStatic = mn.isStatic();
          }
          if (staticOnly && !isStatic) return null;
          return member;
      }