docs: private static Class getClassForClassNode(ClassNode type) {
          // todo hamlet - move to a different "InferenceUtil" object
          Class primitiveType = getPrimitiveType(type);
          if (primitiveType != null) {
              return primitiveType;
          } else if (classNodeImplementsType(type, String.class)) {
              return String.class;
          } else if (classNodeImplementsType(type, ReentrantLock.class)) {
              return ReentrantLock.class;
          } else if (type.getName() != null && type.getName().endsWith("[]")) {
              return Object[].class;       // better type inference could be done, but oh well
          }
          return null;
      }