toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() => <String, Object?>{
      ...super.toJson(),
      'type': type,
      'kind': kind ?? '',
      'identityHashCode': identityHashCode ?? -1,
      'class': classRef?.toJson(),
      if (valueAsString case final valueAsStringValue?)
        'valueAsString': valueAsStringValue,
      if (valueAsStringIsTruncated case final valueAsStringIsTruncatedValue?)
        'valueAsStringIsTruncated': valueAsStringIsTruncatedValue,
      if (length case final lengthValue?) 'length': lengthValue,
      if (offset case final offsetValue?) 'offset': offsetValue,
      if (count case final countValue?) 'count': countValue,
      if (name case final nameValue?) 'name': nameValue,
      if (typeClass?.toJson() case final typeClassValue?)
        'typeClass': typeClassValue,
      if (parameterizedClass?.toJson() case final parameterizedClassValue?)
        'parameterizedClass': parameterizedClassValue,
      if (returnType?.toJson() case final returnTypeValue?)
        'returnType': returnTypeValue,
      if (parameters?.map((f) => f.toJson()).toList()
          case final parametersValue?)
        'parameters': parametersValue,
      if (typeParameters?.map((f) => f.toJson()).toList()
          case final typeParametersValue?)
        'typeParameters': typeParametersValue,
      if (fields?.map((f) => f.toJson()).toList() case final fieldsValue?)
        'fields': fieldsValue,
      if (elements?.map((f) => f.toJson()).toList() case final elementsValue?)
        'elements': elementsValue,
      if (associations?.map((f) => f.toJson()).toList()
          case final associationsValue?)
        'associations': associationsValue,
      if (bytes case final bytesValue?) 'bytes': bytesValue,
      if (mirrorReferent?.toJson() case final mirrorReferentValue?)
        'mirrorReferent': mirrorReferentValue,
      if (pattern?.toJson() case final patternValue?) 'pattern': patternValue,
      if (closureFunction?.toJson() case final closureFunctionValue?)
        'closureFunction': closureFunctionValue,
      if (closureContext?.toJson() case final closureContextValue?)
        'closureContext': closureContextValue,
      if (closureReceiver?.toJson() case final closureReceiverValue?)
        'closureReceiver': closureReceiverValue,
      if (isCaseSensitive case final isCaseSensitiveValue?)
        'isCaseSensitive': isCaseSensitiveValue,
      if (isMultiLine case final isMultiLineValue?)
        'isMultiLine': isMultiLineValue,
      if (propertyKey?.toJson() case final propertyKeyValue?)
        'propertyKey': propertyKeyValue,
      if (propertyValue?.toJson() case final propertyValueValue?)
        'propertyValue': propertyValueValue,
      if (target?.toJson() case final targetValue?) 'target': targetValue,
      if (typeArguments?.toJson() case final typeArgumentsValue?)
        'typeArguments': typeArgumentsValue,
      if (parameterIndex case final parameterIndexValue?)
        'parameterIndex': parameterIndexValue,
      if (targetType?.toJson() case final targetTypeValue?)
        'targetType': targetTypeValue,
      if (bound?.toJson() case final boundValue?) 'bound': boundValue,
      if (portId case final portIdValue?) 'portId': portIdValue,
      if (allocationLocation?.toJson() case final allocationLocationValue?)
        'allocationLocation': allocationLocationValue,
      if (debugName case final debugNameValue?) 'debugName': debugNameValue,
      if (label case final labelValue?) 'label': labelValue,
      if (callback?.toJson() case final callbackValue?)
        'callback': callbackValue,
      if (callbackAddress?.toJson() case final callbackAddressValue?)
        'callbackAddress': callbackAddressValue,
      if (allEntries?.toJson() case final allEntriesValue?)
        'allEntries': allEntriesValue,
      if (value?.toJson() case final valueValue?) 'value': valueValue,
      if (token?.toJson() case final tokenValue?) 'token': tokenValue,
      if (detach?.toJson() case final detachValue?) 'detach': detachValue,
    };