2017-11-28 Brian Burg <bburg@apple.com>
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2017 23:34:07 +0000 (23:34 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2017 23:34:07 +0000 (23:34 +0000)
[Cocoa] Clean up names of conversion methods after renaming InspectorValue to JSON::Value
https://bugs.webkit.org/show_bug.cgi?id=179696

Reviewed by Timothy Hatcher.

* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator._generate_type_interface):
* inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:
(ObjCProtocolTypesImplementationGenerator.generate_type_implementation):
(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_protocol_object):
(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_json_object): Deleted.
* inspector/scripts/codegen/objc_generator.py:
(ObjCGenerator.protocol_type_for_raw_name):
(ObjCGenerator.objc_protocol_export_expression_for_variable):
(ObjCGenerator.objc_protocol_export_expression_for_variable.is):
(ObjCGenerator.objc_protocol_import_expression_for_variable):
(ObjCGenerator.objc_protocol_import_expression_for_variable.is):
(ObjCGenerator.objc_to_protocol_expression_for_member.is):
(ObjCGenerator.objc_to_protocol_expression_for_member):
(ObjCGenerator.protocol_to_objc_expression_for_member.is):
(ObjCGenerator.protocol_to_objc_expression_for_member):
(ObjCGenerator.protocol_to_objc_code_block_for_object_member):
(ObjCGenerator.objc_setter_method_for_member_internal):
(ObjCGenerator.objc_getter_method_for_member_internal):
* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225243 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py
Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py
Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py
Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result
Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result

index 63c27ac..f1a7277 100644 (file)
@@ -1,3 +1,40 @@
+ 2017-11-28  Brian Burg  <bburg@apple.com>
+
+        [Cocoa] Clean up names of conversion methods after renaming InspectorValue to JSON::Value
+        https://bugs.webkit.org/show_bug.cgi?id=179696
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/scripts/codegen/generate_objc_header.py:
+        (ObjCHeaderGenerator._generate_type_interface):
+        * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:
+        (ObjCProtocolTypesImplementationGenerator.generate_type_implementation):
+        (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_protocol_object):
+        (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_json_object): Deleted.
+        * inspector/scripts/codegen/objc_generator.py:
+        (ObjCGenerator.protocol_type_for_raw_name):
+        (ObjCGenerator.objc_protocol_export_expression_for_variable):
+        (ObjCGenerator.objc_protocol_export_expression_for_variable.is):
+        (ObjCGenerator.objc_protocol_import_expression_for_variable):
+        (ObjCGenerator.objc_protocol_import_expression_for_variable.is):
+        (ObjCGenerator.objc_to_protocol_expression_for_member.is):
+        (ObjCGenerator.objc_to_protocol_expression_for_member):
+        (ObjCGenerator.protocol_to_objc_expression_for_member.is):
+        (ObjCGenerator.protocol_to_objc_expression_for_member):
+        (ObjCGenerator.protocol_to_objc_code_block_for_object_member):
+        (ObjCGenerator.objc_setter_method_for_member_internal):
+        (ObjCGenerator.objc_getter_method_for_member_internal):
+        * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
+        * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
+        * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
+        * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
+        * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
+        * inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
+        * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
+        * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
+        * inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result:
+        * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
+
 2017-11-27  JF Bastien  <jfbastien@apple.com>
 
         JavaScript rest function parameter with negative index leads to bad DFG abstract interpretation
index 801f40a..a8343e6 100755 (executable)
@@ -166,10 +166,10 @@ class ObjCHeaderGenerator(ObjCGenerator):
         lines.append('__attribute__((visibility ("default")))')
         lines.append('@interface %s : %sJSONObject' % (objc_name, ObjCGenerator.OBJC_STATIC_PREFIX))
 
-        # The initializers that take a payload or inspector object are only needed by the frontend.
+        # The initializers that take a payload or protocol object are only needed by the frontend.
         if self.get_generator_setting('generate_frontend', False):
             lines.append('- (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;')
-            lines.append('- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;')
+            lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;')
 
         required_members = filter(lambda member: not member.is_optional, declaration.type_members)
         optional_members = filter(lambda member: member.is_optional, declaration.type_members)
index 1a66488..0ba55ee 100755 (executable)
@@ -94,7 +94,7 @@ class ObjCProtocolTypesImplementationGenerator(ObjCGenerator):
         if self.get_generator_setting('generate_frontend', False):
             lines.append('')
             lines.append(self._generate_init_method_for_payload(domain, declaration))
-            lines.append(self._generate_init_method_for_json_object(domain, declaration))
+            lines.append(self._generate_init_method_for_protocol_object(domain, declaration))
         required_members = filter(lambda member: not member.is_optional, declaration.type_members)
         if required_members:
             lines.append('')
@@ -108,11 +108,11 @@ class ObjCProtocolTypesImplementationGenerator(ObjCGenerator):
         lines.append('@end')
         return '\n'.join(lines)
 
-    def _generate_init_method_for_json_object(self, domain, declaration):
+    def _generate_init_method_for_protocol_object(self, domain, declaration):
         lines = []
-        lines.append('- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject')
+        lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object')
         lines.append('{')
-        lines.append('    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))')
+        lines.append('    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))')
         lines.append('        return nil;')
         lines.append('')
         lines.append('    return self;')
index 944d2e6..69902fb 100755 (executable)
@@ -247,7 +247,7 @@ class ObjCGenerator(Generator):
         if raw_name is 'boolean':
             return 'bool'
         if raw_name in ['any', 'object']:
-            return 'InspectorObject'
+            return 'JSON::Object'
         return None
 
     @staticmethod
@@ -371,19 +371,19 @@ class ObjCGenerator(Generator):
                 return 'toProtocolString(%s)' % var_name
             return var_name
         if category is ObjCTypeCategory.Object:
-            return '[%s toInspectorObject]' % var_name
+            return '[%s toJSONObject]' % var_name
         if category is ObjCTypeCategory.Array:
             protocol_type = ObjCGenerator.protocol_type_for_type(var_type.element_type)
             objc_class = self.objc_class_for_type(var_type.element_type)
             if protocol_type == 'Inspector::Protocol::Array<String>':
-                return 'inspectorStringArrayArray(%s)' % var_name
+                return 'toJSONStringArrayArray(%s)' % var_name
             if protocol_type is 'String' and objc_class is 'NSString':
-                return 'inspectorStringArray(%s)' % var_name
+                return 'toJSONStringArray(%s)' % var_name
             if protocol_type is 'int' and objc_class is 'NSNumber':
-                return 'inspectorIntegerArray(%s)' % var_name
+                return 'toJSONIntegerArray(%s)' % var_name
             if protocol_type is 'double' and objc_class is 'NSNumber':
-                return 'inspectorDoubleArray(%s)' % var_name
-            return 'inspectorObjectArray(%s)' % var_name
+                return 'toJSONDoubleArray(%s)' % var_name
+            return 'toJSONObjectArray(%s)' % var_name
 
     def objc_protocol_import_expression_for_member(self, name, declaration, member):
         if isinstance(member.type, EnumType):
@@ -405,14 +405,14 @@ class ObjCGenerator(Generator):
             return var_name
         if category is ObjCTypeCategory.Object:
             objc_class = self.objc_class_for_type(var_type)
-            return '[[[%s alloc] initWithInspectorObject:%s] autorelease]' % (objc_class, var_name)
+            return '[[[%s alloc] initWithJSONObject:%s] autorelease]' % (objc_class, var_name)
         if category is ObjCTypeCategory.Array:
             objc_class = self.objc_class_for_type(var_type.element_type)
             if objc_class is 'NSString':
-                return 'objcStringArray(%s)' % var_name
+                return 'toObjCStringArray(%s)' % var_name
             if objc_class is 'NSNumber':  # FIXME: Integer or Double?
-                return 'objcIntegerArray(%s)' % var_name
-            return 'objcArray<%s>(%s)' % (objc_class, var_name)
+                return 'toObjCIntegerArray(%s)' % var_name
+            return 'toObjCArray<%s>(%s)' % (objc_class, var_name)
 
     # ObjC <-> JSON object conversion for types getters/setters.
     #   - convert a member setter from ObjC API to JSON object setter
@@ -429,13 +429,13 @@ class ObjCGenerator(Generator):
         if category is ObjCTypeCategory.Array:
             objc_class = self.objc_class_for_type(member.type.element_type)
             if objc_class is 'NSString':
-                return 'inspectorStringArray(%s)' % sub_expression
+                return 'toJSONStringArray(%s)' % sub_expression
             if objc_class is 'NSNumber':
                 protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
                 if protocol_type is 'double':
-                    return 'inspectorDoubleArray(%s)' % sub_expression
-                return 'inspectorIntegerArray(%s)' % sub_expression
-            return 'inspectorObjectArray(%s)' % sub_expression
+                    return 'toJSONDoubleArray(%s)' % sub_expression
+                return 'toJSONIntegerArray(%s)' % sub_expression
+            return 'toJSONObjectArray(%s)' % sub_expression
 
     def protocol_to_objc_expression_for_member(self, declaration, member, sub_expression):
         category = ObjCTypeCategory.category_for_type(member.type)
@@ -451,13 +451,13 @@ class ObjCGenerator(Generator):
             protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
             objc_class = self.objc_class_for_type(member.type.element_type)
             if objc_class is 'NSString':
-                return 'objcStringArray(%s)' % sub_expression
+                return 'toObjCStringArray(%s)' % sub_expression
             if objc_class is 'NSNumber':
                 protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type)
                 if protocol_type is 'double':
-                    return 'objcDoubleArray(%s)' % sub_expression
-                return 'objcIntegerArray(%s)' % sub_expression
-            return 'objcArray<%s>(%s)' % (objc_class, sub_expression)
+                    return 'toObjCDoubleArray(%s)' % sub_expression
+                return 'toObjCIntegerArray(%s)' % sub_expression
+            return 'toObjCArray<%s>(%s)' % (objc_class, sub_expression)
 
     def protocol_to_objc_code_block_for_object_member(self, declaration, member, sub_expression):
         objc_class = self.objc_class_for_type(member.type)
@@ -465,7 +465,7 @@ class ObjCGenerator(Generator):
         lines.append('    %sJSONObject *object = %s;' % (ObjCGenerator.OBJC_STATIC_PREFIX, sub_expression))
         lines.append('    if (!object)')
         lines.append('        return nil;')
-        lines.append('    return [[%s alloc] initWithInspectorObject:[%s toInspectorObject].get()];' % (objc_class, sub_expression))
+        lines.append('    return [[%s alloc] initWithJSONObject:[%s toJSONObject].get()];' % (objc_class, sub_expression))
         return '\n'.join(lines)
 
     def payload_to_objc_expression_for_member(self, declaration, member):
@@ -528,14 +528,14 @@ class ObjCGenerator(Generator):
             if raw_name in ['any', 'object']:
                 return 'setObject'
             if raw_name is 'array':
-                return 'setInspectorArray'
+                return 'setJSONArray'
             return None
         if (isinstance(_type, EnumType)):
             return 'setString'
         if (isinstance(_type, ObjectType)):
             return 'setObject'
         if (isinstance(_type, ArrayType)):
-            return 'setInspectorArray'
+            return 'setJSONArray'
         return None
 
     @staticmethod
@@ -559,12 +559,12 @@ class ObjCGenerator(Generator):
             if raw_name in ['any', 'object']:
                 return 'objectForKey'
             if raw_name is 'array':
-                return 'inspectorArrayForKey'
+                return 'JSONArrayForKey'
             return None
         if (isinstance(_type, EnumType)):
             return 'stringForKey'
         if (isinstance(_type, ObjectType)):
             return 'objectForKey'
         if (isinstance(_type, ArrayType)):
-            return 'inspectorArrayForKey'
+            return 'JSONArrayForKey'
         return None
index 1b000e6..237530e 100644 (file)
@@ -907,7 +907,7 @@ typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
 __attribute__((visibility ("default")))
 @interface TestProtocolNetworkError : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
 /* required */ @property (nonatomic, copy) NSString *message;
 /* required */ @property (nonatomic, assign) int code;
@@ -1156,9 +1156,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
index 0e9259d..76e86dd 100644 (file)
@@ -930,23 +930,23 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLSyncOptionalReturnValues(
         THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
         THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
         if (columnNames)
-            resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+            resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
         if (notes)
             resultObject->setString(ASCIILiteral("notes"), *notes);
         if (timestamp)
             resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
         if (values)
-            resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+            resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
         if (payload)
-            resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+            resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
         if (databaseId)
             resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
         if (sqlError)
-            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
         if (screenColor)
             resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
         if (alternateColors)
-            resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+            resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
         if (printColor)
             resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
         backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -974,23 +974,23 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLAsyncOptionalReturnValues
         THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
         THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
         if (columnNames)
-            resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+            resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
         if (notes)
             resultObject->setString(ASCIILiteral("notes"), *notes);
         if (timestamp)
             resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
         if (values)
-            resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+            resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
         if (payload)
-            resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+            resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
         if (databaseId)
             resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
         if (sqlError)
-            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
         if (screenColor)
             resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
         if (alternateColors)
-            resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+            resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
         if (printColor)
             resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
         backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -1017,14 +1017,14 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLSync(long requestId, int
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
-        resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+        resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
         resultObject->setString(ASCIILiteral("notes"), notes);
         resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
-        resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
-        resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+        resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+        resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
         resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
-        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
-        resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
+        resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
         resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
         resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
         backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -1051,15 +1051,15 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLAsync(long requestId, int
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
-        resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+        resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
         resultObject->setString(ASCIILiteral("notes"), notes);
         resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
-        resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
-        resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+        resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+        resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
         resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
-        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
         resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
-        resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+        resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
         resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
         backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
     };
@@ -1328,7 +1328,7 @@ typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteSQLAsyncPrintColor) {
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseError : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
 /* required */ @property (nonatomic, copy) NSString *message;
 /* required */ @property (nonatomic, assign) int code;
@@ -1733,9 +1733,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
index ae2cd24..0ce0c18 100644 (file)
@@ -829,23 +829,23 @@ void ObjCInspectorDatabaseBackendDispatcher::executeAllOptionalParameters(long r
         THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
         THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
         if (columnNames)
-            resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(*columnNames));
+            resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames));
         if (notes)
             resultObject->setString(ASCIILiteral("notes"), *notes);
         if (timestamp)
             resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
         if (values)
-            resultObject->setObject(ASCIILiteral("values"), [*values toInspectorObject]);
+            resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]);
         if (payload)
-            resultObject->setValue(ASCIILiteral("payload"), [*payload toInspectorObject]);
+            resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]);
         if (databaseId)
             resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId);
         if (sqlError)
-            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toInspectorObject]);
+            resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]);
         if (screenColor)
             resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor));
         if (alternateColors)
-            resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(*alternateColors));
+            resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors));
         if (printColor)
             resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor));
         backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
@@ -853,7 +853,7 @@ void ObjCInspectorDatabaseBackendDispatcher::executeAllOptionalParameters(long r
 
     NSArray/*<NSString>*/ *o_in_columnNames;
     if (in_columnNames)
-        o_in_columnNames = objcStringArray(in_columnNames);
+        o_in_columnNames = toObjCStringArray(in_columnNames);
     NSString *o_in_notes;
     if (in_notes)
         o_in_notes = *in_notes;
@@ -862,22 +862,22 @@ void ObjCInspectorDatabaseBackendDispatcher::executeAllOptionalParameters(long r
         o_in_timestamp = *in_timestamp;
     RWIProtocolJSONObject *o_in_values;
     if (in_values)
-        o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_values] autorelease];
+        o_in_values = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_values] autorelease];
     RWIProtocolJSONObject *o_in_payload;
     if (in_payload)
-        o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:in_payload] autorelease];
+        o_in_payload = [[[RWIProtocolJSONObject alloc] initWithJSONObject:in_payload] autorelease];
     int o_in_databaseId;
     if (in_databaseId)
         o_in_databaseId = *in_databaseId;
     TestProtocolDatabaseError *o_in_sqlError;
     if (in_sqlError)
-        o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:in_sqlError] autorelease];
+        o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:in_sqlError] autorelease];
     std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor;
     if (in_screenColor)
         o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(*in_screenColor);
     NSArray/*<NSString>*/ *o_in_alternateColors;
     if (in_alternateColors)
-        o_in_alternateColors = objcStringArray(in_alternateColors);
+        o_in_alternateColors = toObjCStringArray(in_alternateColors);
     std::optional<TestProtocolDatabaseExecuteAllOptionalParametersPrintColor> o_in_printColor;
     if (in_printColor)
         o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteAllOptionalParametersPrintColor>(*in_printColor);
@@ -900,32 +900,32 @@ void ObjCInspectorDatabaseBackendDispatcher::executeNoOptionalParameters(long re
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
         THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
-        resultObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+        resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
         resultObject->setString(ASCIILiteral("notes"), notes);
         resultObject->setDouble(ASCIILiteral("timestamp"), timestamp);
-        resultObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
-        resultObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
+        resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+        resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
         resultObject->setInteger(ASCIILiteral("databaseId"), databaseId);
-        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+        resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
         resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor));
-        resultObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+        resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
         resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor));
         backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);
     };
 
-    NSArray/*<NSString>*/ *o_in_columnNames = objcStringArray(&in_columnNames);
+    NSArray/*<NSString>*/ *o_in_columnNames = toObjCStringArray(&in_columnNames);
     NSString *o_in_notes = in_notes;
     double o_in_timestamp = in_timestamp;
-    RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&in_values] autorelease];
-    RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWithInspectorObject:&in_payload] autorelease];
+    RWIProtocolJSONObject *o_in_values = [[[RWIProtocolJSONObject alloc] initWithJSONObject:&in_values] autorelease];
+    RWIProtocolJSONObject *o_in_payload = [[[RWIProtocolJSONObject alloc] initWithJSONObject:&in_payload] autorelease];
     int o_in_databaseId = in_databaseId;
-    TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithInspectorObject:&in_sqlError] autorelease];
+    TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:&in_sqlError] autorelease];
     std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(in_screenColor);
     if (!o_in_screenColor) {
         backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' of method '%s' cannot be processed", "screenColor", "Database.executeNoOptionalParameters"));
         return;
     }
-    NSArray/*<NSString>*/ *o_in_alternateColors = objcStringArray(&in_alternateColors);
+    NSArray/*<NSString>*/ *o_in_alternateColors = toObjCStringArray(&in_alternateColors);
     std::optional<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor> o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor>(in_printColor);
     if (!o_in_printColor) {
         backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' of method '%s' cannot be processed", "printColor", "Database.executeNoOptionalParameters"));
@@ -1193,7 +1193,7 @@ typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteNoOptionalParametersPrintC
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseError : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
 /* required */ @property (nonatomic, copy) NSString *message;
 /* required */ @property (nonatomic, assign) int code;
@@ -1596,9 +1596,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
index 7bfc244..f620581 100644 (file)
@@ -789,21 +789,21 @@ using namespace Inspector;
     jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters"));
     Ref<JSON::Object> paramsObject = JSON::Object::create();
     if (columnNames)
-        paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray((*columnNames)));
+        paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray((*columnNames)));
     if (notes)
         paramsObject->setString(ASCIILiteral("notes"), (*notes));
     if (timestamp)
         paramsObject->setDouble(ASCIILiteral("timestamp"), (*timestamp));
     if (values)
-        paramsObject->setObject(ASCIILiteral("values"), [(*values) toInspectorObject]);
+        paramsObject->setObject(ASCIILiteral("values"), [(*values) toJSONObject]);
     if (payload)
-        paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toInspectorObject]);
+        paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toJSONObject]);
     if (sqlError)
-        paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toInspectorObject]);
+        paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toJSONObject]);
     if (screenColor)
         paramsObject->setString(ASCIILiteral("screenColor"), (*screenColor));
     if (alternateColors)
-        paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray((*alternateColors)));
+        paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray((*alternateColors)));
     if (printColor)
         paramsObject->setString(ASCIILiteral("printColor"), (*printColor));
     jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
@@ -826,14 +826,14 @@ using namespace Inspector;
     Ref<JSON::Object> jsonMessage = JSON::Object::create();
     jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters"));
     Ref<JSON::Object> paramsObject = JSON::Object::create();
-    paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
+    paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames));
     paramsObject->setString(ASCIILiteral("notes"), notes);
     paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
-    paramsObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
-    paramsObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
-    paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
+    paramsObject->setObject(ASCIILiteral("values"), [values toJSONObject]);
+    paramsObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]);
+    paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]);
     paramsObject->setString(ASCIILiteral("screenColor"), screenColor);
-    paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
+    paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors));
     paramsObject->setString(ASCIILiteral("printColor"), printColor);
     jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));
     router.sendEvent(jsonMessage->toJSONString());
@@ -895,7 +895,7 @@ typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseError : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
 /* required */ @property (nonatomic, copy) NSString *message;
 /* required */ @property (nonatomic, assign) int code;
@@ -1163,9 +1163,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
index 4afd66f..3295269 100644 (file)
@@ -934,7 +934,7 @@ typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
 __attribute__((visibility ("default")))
 @interface TestProtocolNetwork2NetworkError : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
 /* required */ @property (nonatomic, copy) NSString *message;
 /* required */ @property (nonatomic, assign) int code;
@@ -1183,9 +1183,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
index d110eec..b2106ef 100644 (file)
@@ -797,7 +797,7 @@ typedef NS_ENUM(NSInteger, TestProtocolRuntimeKeyPathType) {
 __attribute__((visibility ("default")))
 @interface TestProtocolRuntimeKeyPath : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithType:(TestProtocolRuntimeKeyPathType)type;
 /* required */ @property (nonatomic, assign) TestProtocolRuntimeKeyPathType type;
 /* optional */ @property (nonatomic, copy) NSString *string;
@@ -1065,9 +1065,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -1105,12 +1105,12 @@ using namespace Inspector;
 
 - (void)setArray:(NSArray/*<NSString>*/ *)array
 {
-    [super setInspectorArray:inspectorStringArray(array) forKey:@"array"];
+    [super setJSONArray:toJSONStringArray(array) forKey:@"array"];
 }
 
 - (NSArray/*<NSString>*/ *)array
 {
-    return objcStringArray([super inspectorArrayForKey:@"array"]);
+    return toObjCStringArray([super JSONArrayForKey:@"array"]);
 }
 
 @end
index fb86bea..6495702 100644 (file)
@@ -1339,7 +1339,7 @@ typedef NS_ENUM(NSInteger, TestProtocolTestParameterBundleDirectionality) {
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseError : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
 /* required */ @property (nonatomic, copy) NSString *message;
 /* required */ @property (nonatomic, assign) int code;
@@ -1348,7 +1348,7 @@ __attribute__((visibility ("default")))
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseOptionalParameterBundle : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 /* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
 /* optional */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons;
 /* optional */ @property (nonatomic, assign) TestProtocolDatabaseOptionalParameterBundleDirectionality directionality;
@@ -1363,7 +1363,7 @@ __attribute__((visibility ("default")))
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseParameterBundle : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithColumnNames:(NSArray/*<NSString>*/ *)columnNames buttons:(NSArray/*<NSString>*/ *)buttons directionality:(TestProtocolDatabaseParameterBundleDirectionality)directionality notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error errorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList;
 /* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *columnNames;
 /* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons;
@@ -1379,7 +1379,7 @@ __attribute__((visibility ("default")))
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseObjectWithPropertyNameConflicts : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithInteger:(NSString *)integer array:(NSString *)array string:(NSString *)string value:(NSString *)value object:(NSString *)object;
 /* required */ @property (nonatomic, copy) NSString *integer;
 /* required */ @property (nonatomic, copy) NSString *array;
@@ -1391,13 +1391,13 @@ __attribute__((visibility ("default")))
 __attribute__((visibility ("default")))
 @interface TestProtocolDatabaseDummyObject : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 @end
 
 __attribute__((visibility ("default")))
 @interface TestProtocolTestParameterBundle : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithDirectionality:(TestProtocolTestParameterBundleDirectionality)directionality buttons:(NSArray/*<NSString>*/ *)buttons columnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload error:(TestProtocolDatabaseError *)error;
 /* required */ @property (nonatomic, assign) TestProtocolTestParameterBundleDirectionality directionality;
 /* required */ @property (nonatomic, copy) NSArray/*<NSString>*/ *buttons;
@@ -1790,9 +1790,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -1862,9 +1862,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -1872,22 +1872,22 @@ using namespace Inspector;
 
 - (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
 {
-    [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+    [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
 }
 
 - (NSArray/*<NSString>*/ *)columnNames
 {
-    return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+    return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
 }
 
 - (void)setButtons:(NSArray/*<NSString>*/ *)buttons
 {
-    [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
+    [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
 }
 
 - (NSArray/*<NSString>*/ *)buttons
 {
-    return objcStringArray([super inspectorArrayForKey:@"buttons"]);
+    return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
 }
 
 - (void)setDirectionality:(TestProtocolDatabaseOptionalParameterBundleDirectionality)directionality
@@ -1930,7 +1930,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"values"];
     if (!object)
         return nil;
-    return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
 }
 
 - (void)setPayload:(RWIProtocolJSONObject *)payload
@@ -1943,7 +1943,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"payload"];
     if (!object)
         return nil;
-    return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
 }
 
 - (void)setError:(TestProtocolDatabaseError *)error
@@ -1956,18 +1956,18 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"error"];
     if (!object)
         return nil;
-    return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+    return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
 }
 
 - (void)setErrorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList
 {
     THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
-    [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+    [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"];
 }
 
 - (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
 {
-    return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+    return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]);
 }
 
 @end
@@ -2010,9 +2010,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -2047,22 +2047,22 @@ using namespace Inspector;
 
 - (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
 {
-    [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+    [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
 }
 
 - (NSArray/*<NSString>*/ *)columnNames
 {
-    return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+    return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
 }
 
 - (void)setButtons:(NSArray/*<NSString>*/ *)buttons
 {
-    [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
+    [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
 }
 
 - (NSArray/*<NSString>*/ *)buttons
 {
-    return objcStringArray([super inspectorArrayForKey:@"buttons"]);
+    return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
 }
 
 - (void)setDirectionality:(TestProtocolDatabaseParameterBundleDirectionality)directionality
@@ -2105,7 +2105,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"values"];
     if (!object)
         return nil;
-    return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
 }
 
 - (void)setPayload:(RWIProtocolJSONObject *)payload
@@ -2118,7 +2118,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"payload"];
     if (!object)
         return nil;
-    return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
 }
 
 - (void)setError:(TestProtocolDatabaseError *)error
@@ -2131,18 +2131,18 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"error"];
     if (!object)
         return nil;
-    return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+    return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
 }
 
 - (void)setErrorList:(NSArray/*<TestProtocolDatabaseError>*/ *)errorList
 {
     THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(errorList, [TestProtocolDatabaseError class]);
-    [super setInspectorArray:inspectorObjectArray(errorList) forKey:@"errorList"];
+    [super setJSONArray:toJSONObjectArray(errorList) forKey:@"errorList"];
 }
 
 - (NSArray/*<TestProtocolDatabaseError>*/ *)errorList
 {
-    return objcArray<TestProtocolDatabaseError>([super inspectorArrayForKey:@"errorList"]);
+    return toObjCArray<TestProtocolDatabaseError>([super JSONArrayForKey:@"errorList"]);
 }
 
 @end
@@ -2171,9 +2171,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -2260,9 +2260,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -2306,9 +2306,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -2350,22 +2350,22 @@ using namespace Inspector;
 
 - (void)setButtons:(NSArray/*<NSString>*/ *)buttons
 {
-    [super setInspectorArray:inspectorStringArray(buttons) forKey:@"buttons"];
+    [super setJSONArray:toJSONStringArray(buttons) forKey:@"buttons"];
 }
 
 - (NSArray/*<NSString>*/ *)buttons
 {
-    return objcStringArray([super inspectorArrayForKey:@"buttons"]);
+    return toObjCStringArray([super JSONArrayForKey:@"buttons"]);
 }
 
 - (void)setColumnNames:(NSArray/*<NSString>*/ *)columnNames
 {
-    [super setInspectorArray:inspectorStringArray(columnNames) forKey:@"columnNames"];
+    [super setJSONArray:toJSONStringArray(columnNames) forKey:@"columnNames"];
 }
 
 - (NSArray/*<NSString>*/ *)columnNames
 {
-    return objcStringArray([super inspectorArrayForKey:@"columnNames"]);
+    return toObjCStringArray([super JSONArrayForKey:@"columnNames"]);
 }
 
 - (void)setNotes:(NSString *)notes
@@ -2398,7 +2398,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"values"];
     if (!object)
         return nil;
-    return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"values"] toInspectorObject].get()];
+    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"values"] toJSONObject].get()];
 }
 
 - (void)setPayload:(RWIProtocolJSONObject *)payload
@@ -2411,7 +2411,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"payload"];
     if (!object)
         return nil;
-    return [[RWIProtocolJSONObject alloc] initWithInspectorObject:[[super objectForKey:@"payload"] toInspectorObject].get()];
+    return [[RWIProtocolJSONObject alloc] initWithJSONObject:[[super objectForKey:@"payload"] toJSONObject].get()];
 }
 
 - (void)setError:(TestProtocolDatabaseError *)error
@@ -2424,7 +2424,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"error"];
     if (!object)
         return nil;
-    return [[TestProtocolDatabaseError alloc] initWithInspectorObject:[[super objectForKey:@"error"] toInspectorObject].get()];
+    return [[TestProtocolDatabaseError alloc] initWithJSONObject:[[super objectForKey:@"error"] toJSONObject].get()];
 }
 
 @end
index b3600fc..7d1bfef 100644 (file)
@@ -1105,7 +1105,7 @@ typedef NS_ENUM(NSInteger, TestProtocolTestCastedAnimals) {
 __attribute__((visibility ("default")))
 @interface TestProtocolTestTypeNeedingCast : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithString:(NSString *)string number:(int)number animals:(TestProtocolTestCastedAnimals)animals identifier:(int)identifier tree:(TestProtocolTestRecursiveObject1 *)tree;
 /* required */ @property (nonatomic, copy) NSString *string;
 /* required */ @property (nonatomic, assign) int number;
@@ -1117,14 +1117,14 @@ __attribute__((visibility ("default")))
 __attribute__((visibility ("default")))
 @interface TestProtocolTestRecursiveObject1 : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 /* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject2 *obj;
 @end
 
 __attribute__((visibility ("default")))
 @interface TestProtocolTestRecursiveObject2 : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 /* optional */ @property (nonatomic, retain) TestProtocolTestRecursiveObject1 *obj;
 @end
 
@@ -1475,9 +1475,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -1550,7 +1550,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"tree"];
     if (!object)
         return nil;
-    return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"tree"] toInspectorObject].get()];
+    return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"tree"] toJSONObject].get()];
 }
 
 @end
@@ -1566,9 +1566,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -1584,7 +1584,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"obj"];
     if (!object)
         return nil;
-    return [[TestProtocolTestRecursiveObject2 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
+    return [[TestProtocolTestRecursiveObject2 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()];
 }
 
 @end
@@ -1600,9 +1600,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -1618,7 +1618,7 @@ using namespace Inspector;
     RWIProtocolJSONObject *object = [super objectForKey:@"obj"];
     if (!object)
         return nil;
-    return [[TestProtocolTestRecursiveObject1 alloc] initWithInspectorObject:[[super objectForKey:@"obj"] toInspectorObject].get()];
+    return [[TestProtocolTestRecursiveObject1 alloc] initWithJSONObject:[[super objectForKey:@"obj"] toJSONObject].get()];
 }
 
 @end
index b1439cf..11a208a 100644 (file)
@@ -800,7 +800,7 @@ typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
 __attribute__((visibility ("default")))
 @interface TestProtocolTestNoOpenParameters : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithOne:(double)one two:(double)two;
 /* required */ @property (nonatomic, assign) double one;
 /* required */ @property (nonatomic, assign) double two;
@@ -809,7 +809,7 @@ __attribute__((visibility ("default")))
 __attribute__((visibility ("default")))
 @interface TestProtocolTestOpenParameters : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithAlpha:(double)alpha beta:(double)beta;
 /* required */ @property (nonatomic, assign) double alpha;
 /* required */ @property (nonatomic, assign) double beta;
@@ -1057,9 +1057,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
@@ -1113,9 +1113,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;
index 1b000e6..237530e 100644 (file)
@@ -907,7 +907,7 @@ typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
 __attribute__((visibility ("default")))
 @interface TestProtocolNetworkError : RWIProtocolJSONObject
 - (instancetype)initWithPayload:(NSDictionary<NSString *, id> *)payload;
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject;
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
 - (instancetype)initWithMessage:(NSString *)message code:(int)code;
 /* required */ @property (nonatomic, copy) NSString *message;
 /* required */ @property (nonatomic, assign) int code;
@@ -1156,9 +1156,9 @@ using namespace Inspector;
 
     return self;
 }
-- (instancetype)initWithJSONObject:(RWIProtocolJSONObject *)jsonObject
+- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)object
 {
-    if (!(self = [super initWithInspectorObject:[jsonObject toInspectorObject].get()]))
+    if (!(self = [super initWithJSONObject:[object toJSONObject].get()]))
         return nil;
 
     return self;