code: @SuppressWarnings("Unchecked")
      public static Object checkImmutable(String className, String fieldName, Object field) {
          if (field == null || field instanceof Enum || inImmutableList(field.getClass().getName())) return field;
          if (field instanceof Collection) return DefaultGroovyMethods.asImmutable((Collection) field);
          if (field.getClass().getAnnotation(MY_CLASS) != null) return field;
          final String typeName = field.getClass().getName();
          throw new RuntimeException(createErrorMessage(className, fieldName, typeName, "constructing"));
      }
docs: This method exists to be binary compatible with 1.7 - 1.8.6 compiled code.