+ MonoClass *class;
+ class = mono_class_get_checked (image, type_token, &error);
+
+ if (class && context && mono_metadata_token_table (type_token) == MONO_TABLE_TYPESPEC)
+ class = mono_class_inflate_generic_class_checked (class, context, &error);
+
+ if (!class) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow this error */
+ }
+ return class;
+}
+
+
+MonoClass *
+mono_class_get_and_inflate_typespec_checked (MonoImage *image, guint32 type_token, MonoGenericContext *context, MonoError *error)
+{
+ MonoClass *class;
+
+ mono_error_init (error);
+ class = mono_class_get_checked (image, type_token, error);
+
+ if (class && context && mono_metadata_token_table (type_token) == MONO_TABLE_TYPESPEC)
+ class = mono_class_inflate_generic_class_checked (class, context, error);
+
+ return class;
+}
+/**
+ * mono_class_get_checked:
+ * @image: the image where the class resides
+ * @type_token: the token for the class
+ * @error: error object to return any error
+ *
+ * Returns: the MonoClass that represents @type_token in @image
+ */
+MonoClass *
+mono_class_get_checked (MonoImage *image, guint32 type_token, MonoError *error)
+{