$declaration constant

BridgeClassDef const $declaration

Implementation

static const $declaration = BridgeClassDef(
    BridgeClassType(BridgeTypeRef(CoreTypes.string),
        $implements: [BridgeTypeRef(CoreTypes.pattern)], isAbstract: true),
    constructors: {
      'fromCharCode': BridgeConstructorDef(
          BridgeFunctionDef(
              returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)),
              params: [
                BridgeParameter('charCode',
                    BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int)), false)
              ]),
          isFactory: true),
      'fromCharCodes': BridgeConstructorDef(
          BridgeFunctionDef(
              returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)),
              params: [
                BridgeParameter(
                    'charCodes',
                    BridgeTypeAnnotation(BridgeTypeRef(
                        BridgeTypeSpec('dart:core', 'Iterable'))),
                    false),
                BridgeParameter('start',
                    BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int)), true),
                BridgeParameter(
                    'end',
                    BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
                        nullable: true),
                    true),
              ]),
          isFactory: true),
    },
    methods: {
      // Other string methods defined in builtins.dart
      'split': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
              CoreTypes.list, [BridgeTypeRef(CoreTypes.string)])),
          params: [
            BridgeParameter('pattern',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.pattern)), false)
          ],
          namedParams: [])),
      '[]': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)),
          params: [
            BridgeParameter('index',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int)), false)
          ],
          namedParams: [])),
    },
    getters: {
      'codeUnits': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(
              BridgeTypeRef(CoreTypes.list, [BridgeTypeRef(CoreTypes.int)]))))
    },
    wrap: true);