diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart index 761f9578d1..8a886374fe 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart @@ -7,29 +7,29 @@ import 'package:meta/meta.dart'; /// This is some very useful interface. abstract class Comments { /// This is some very useful constant. - static final bool veryUseful = true; + static final Comments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [inputParameter] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// /// Throws [Comments_SomethingWrongException]. Sometimes it happens. /// - bool someMethodWithAllComments(String inputParameter); + Comments_Usefulness someMethodWithAllComments(String inputParameter); /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - bool someMethodWithInputComments(String input); + Comments_Usefulness someMethodWithInputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// - bool someMethodWithOutputComments(String input); + Comments_Usefulness someMethodWithOutputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - bool someMethodWithNoComments(String input); + Comments_Usefulness someMethodWithNoComments(String input); /// This is some very useful method that does not measure the usefulness of its input. /// /// [input] Very useful input parameter @@ -40,12 +40,12 @@ abstract class Comments { void someMethodWithoutReturnTypeWithNoComments(String input); /// This is some very useful method that measures the usefulness of something. /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// - bool someMethodWithoutInputParametersWithAllComments(); + Comments_Usefulness someMethodWithoutInputParametersWithAllComments(); /// This is some very useful method that measures the usefulness of something. /// - bool someMethodWithoutInputParametersWithNoComments(); + Comments_Usefulness someMethodWithoutInputParametersWithNoComments(); void someMethodWithNothing(); /// This is some very useful method that does nothing. /// @@ -57,10 +57,12 @@ abstract class Comments { /// String returnCommentOnly(String undocumented); /// Gets some very useful property. - bool get isSomeProperty; + Comments_Usefulness get isSomeProperty; /// Sets some very useful property. - set isSomeProperty(bool value); + set isSomeProperty(Comments_Usefulness value); } +/// This is some very useful typedef. +typedef Comments_Usefulness = bool; /// This is some very useful enum. enum Comments_SomeEnum { /// Not quite useful @@ -128,7 +130,7 @@ class Comments_SomethingWrongException implements Exception { class Comments_SomeStruct { /// How useful this struct is /// remains to be seen - bool someField; + Comments_Usefulness someField; /// Can be `null` String? nullableField; /// This is how easy it is to construct. @@ -136,7 +138,7 @@ class Comments_SomeStruct { /// remains to be seen /// [nullableField] Can be `null` Comments_SomeStruct._(this.someField, this.nullableField); - Comments_SomeStruct(bool someField) + Comments_SomeStruct(Comments_Usefulness someField) : someField = someField, nullableField = null; /// This is some struct method that does nothing. /// @@ -354,7 +356,7 @@ final _someMethodWithAllCommentsReturnHasError = __lib.catchArgumentError(() => class Comments$Impl extends __lib.NativeBase implements Comments { Comments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String inputParameter) { + Comments_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -378,7 +380,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithInputComments(String input) { + Comments_Usefulness someMethodWithInputComments(String input) { final _someMethodWithInputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithInputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -391,7 +393,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithOutputComments(String input) { + Comments_Usefulness someMethodWithOutputComments(String input) { final _someMethodWithOutputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithOutputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -404,7 +406,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithNoComments(String input) { + Comments_Usefulness someMethodWithNoComments(String input) { final _someMethodWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithNoComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -433,7 +435,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { stringReleaseFfiHandle(_inputHandle); } @override - bool someMethodWithoutInputParametersWithAllComments() { + Comments_Usefulness someMethodWithoutInputParametersWithAllComments() { final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithAllComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -444,7 +446,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithoutInputParametersWithNoComments() { + Comments_Usefulness someMethodWithoutInputParametersWithNoComments() { final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithNoComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -495,7 +497,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool get isSomeProperty { + Comments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -506,7 +508,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - set isSomeProperty(bool value) { + set isSomeProperty(Comments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_Comments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart index 18d0e70b72..2869fcfc47 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart @@ -8,18 +8,18 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class CommentsInterface { /// This is some very useful interface. factory CommentsInterface( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function(String) someMethodWithInputCommentsLambda, - bool Function(String) someMethodWithOutputCommentsLambda, - bool Function(String) someMethodWithNoCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithAllCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithInputCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithOutputCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithNoCommentsLambda, void Function(String) someMethodWithoutReturnTypeWithAllCommentsLambda, void Function(String) someMethodWithoutReturnTypeWithNoCommentsLambda, - bool Function() someMethodWithoutInputParametersWithAllCommentsLambda, - bool Function() someMethodWithoutInputParametersWithNoCommentsLambda, + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithAllCommentsLambda, + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithNoCommentsLambda, void Function() someMethodWithNothingLambda, void Function() someMethodWithoutReturnTypeOrInputParametersLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda + CommentsInterface_Usefulness Function() isSomePropertyGetLambda, + void Function(CommentsInterface_Usefulness) isSomePropertySetLambda ) => CommentsInterface$Lambdas( someMethodWithAllCommentsLambda, someMethodWithInputCommentsLambda, @@ -36,27 +36,27 @@ abstract class CommentsInterface { ); /// This is some very useful constant. - static final bool veryUseful = true; + static final CommentsInterface_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithAllComments(String input); + CommentsInterface_Usefulness someMethodWithAllComments(String input); /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - bool someMethodWithInputComments(String input); + CommentsInterface_Usefulness someMethodWithInputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithOutputComments(String input); + CommentsInterface_Usefulness someMethodWithOutputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - bool someMethodWithNoComments(String input); + CommentsInterface_Usefulness someMethodWithNoComments(String input); /// This is some very useful method that does not measure the usefulness of its input. /// /// [input] Very useful input parameter @@ -67,21 +67,23 @@ abstract class CommentsInterface { void someMethodWithoutReturnTypeWithNoComments(String input); /// This is some very useful method that measures the usefulness of something. /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithoutInputParametersWithAllComments(); + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments(); /// This is some very useful method that measures the usefulness of something. /// - bool someMethodWithoutInputParametersWithNoComments(); + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments(); void someMethodWithNothing(); /// This is some very useful method that does nothing. /// void someMethodWithoutReturnTypeOrInputParameters(); /// Gets some very useful property. - bool get isSomeProperty; + CommentsInterface_Usefulness get isSomeProperty; /// Sets some very useful property. - set isSomeProperty(bool value); + set isSomeProperty(CommentsInterface_Usefulness value); } +/// This is some very useful typedef. +typedef CommentsInterface_Usefulness = bool; /// This is some very useful enum. enum CommentsInterface_SomeEnum { /// Not quite useful @@ -143,7 +145,7 @@ void smokeCommentsinterfaceSomeenumReleaseFfiHandleNullable(Pointer handle /// This is some very useful struct. class CommentsInterface_SomeStruct { /// How useful this struct is - bool someField; + CommentsInterface_Usefulness someField; CommentsInterface_SomeStruct(this.someField); } // CommentsInterface_SomeStruct "private" section, not exported. @@ -228,18 +230,18 @@ final _smokeCommentsinterfaceGetTypeId = __lib.catchArgumentError(() => __lib.na Pointer Function(Pointer) >('library_smoke_CommentsInterface_get_type_id')); class CommentsInterface$Lambdas implements CommentsInterface { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function(String) someMethodWithInputCommentsLambda; - bool Function(String) someMethodWithOutputCommentsLambda; - bool Function(String) someMethodWithNoCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithAllCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithInputCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithOutputCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithNoCommentsLambda; void Function(String) someMethodWithoutReturnTypeWithAllCommentsLambda; void Function(String) someMethodWithoutReturnTypeWithNoCommentsLambda; - bool Function() someMethodWithoutInputParametersWithAllCommentsLambda; - bool Function() someMethodWithoutInputParametersWithNoCommentsLambda; + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithAllCommentsLambda; + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithNoCommentsLambda; void Function() someMethodWithNothingLambda; void Function() someMethodWithoutReturnTypeOrInputParametersLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + CommentsInterface_Usefulness Function() isSomePropertyGetLambda; + void Function(CommentsInterface_Usefulness) isSomePropertySetLambda; CommentsInterface$Lambdas( this.someMethodWithAllCommentsLambda, this.someMethodWithInputCommentsLambda, @@ -256,16 +258,16 @@ class CommentsInterface$Lambdas implements CommentsInterface { ); @override - bool someMethodWithAllComments(String input) => + CommentsInterface_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool someMethodWithInputComments(String input) => + CommentsInterface_Usefulness someMethodWithInputComments(String input) => someMethodWithInputCommentsLambda(input); @override - bool someMethodWithOutputComments(String input) => + CommentsInterface_Usefulness someMethodWithOutputComments(String input) => someMethodWithOutputCommentsLambda(input); @override - bool someMethodWithNoComments(String input) => + CommentsInterface_Usefulness someMethodWithNoComments(String input) => someMethodWithNoCommentsLambda(input); @override void someMethodWithoutReturnTypeWithAllComments(String input) => @@ -274,10 +276,10 @@ class CommentsInterface$Lambdas implements CommentsInterface { void someMethodWithoutReturnTypeWithNoComments(String input) => someMethodWithoutReturnTypeWithNoCommentsLambda(input); @override - bool someMethodWithoutInputParametersWithAllComments() => + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments() => someMethodWithoutInputParametersWithAllCommentsLambda(); @override - bool someMethodWithoutInputParametersWithNoComments() => + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments() => someMethodWithoutInputParametersWithNoCommentsLambda(); @override void someMethodWithNothing() => @@ -286,15 +288,15 @@ class CommentsInterface$Lambdas implements CommentsInterface { void someMethodWithoutReturnTypeOrInputParameters() => someMethodWithoutReturnTypeOrInputParametersLambda(); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + CommentsInterface_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(CommentsInterface_Usefulness value) => isSomePropertySetLambda(value); } class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterface { CommentsInterface$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + CommentsInterface_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -307,7 +309,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithInputComments(String input) { + CommentsInterface_Usefulness someMethodWithInputComments(String input) { final _someMethodWithInputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithInputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -320,7 +322,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithOutputComments(String input) { + CommentsInterface_Usefulness someMethodWithOutputComments(String input) { final _someMethodWithOutputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithOutputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -333,7 +335,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithNoComments(String input) { + CommentsInterface_Usefulness someMethodWithNoComments(String input) { final _someMethodWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithNoComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -362,7 +364,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa stringReleaseFfiHandle(_inputHandle); } @override - bool someMethodWithoutInputParametersWithAllComments() { + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments() { final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_someMethodWithoutInputParametersWithAllComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -373,7 +375,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithoutInputParametersWithNoComments() { + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments() { final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_someMethodWithoutInputParametersWithNoComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -396,7 +398,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } /// Gets some very useful property. - bool get isSomeProperty { + CommentsInterface_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -407,7 +409,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } /// Sets some very useful property. - set isSomeProperty(bool value) { + set isSomeProperty(CommentsInterface_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_CommentsInterface_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -416,7 +418,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } int _smokeCommentsinterfacesomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -426,7 +428,7 @@ int _smokeCommentsinterfacesomeMethodWithAllCommentsStatic(Object _obj, Pointer< return 0; } int _smokeCommentsinterfacesomeMethodWithInputCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithInputComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -436,7 +438,7 @@ int _smokeCommentsinterfacesomeMethodWithInputCommentsStatic(Object _obj, Pointe return 0; } int _smokeCommentsinterfacesomeMethodWithOutputCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithOutputComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -446,7 +448,7 @@ int _smokeCommentsinterfacesomeMethodWithOutputCommentsStatic(Object _obj, Point return 0; } int _smokeCommentsinterfacesomeMethodWithNoCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithNoComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -472,7 +474,7 @@ int _smokeCommentsinterfacesomeMethodWithoutReturnTypeWithNoCommentsStatic(Objec return 0; } int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithAllCommentsStatic(Object _obj, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithoutInputParametersWithAllComments(); _result.value = booleanToFfi(_resultObject); @@ -481,7 +483,7 @@ int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithAllCommentsStatic return 0; } int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithNoCommentsStatic(Object _obj, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithoutInputParametersWithNoComments(); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart index a1a16c1bbd..c36b00f665 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart @@ -38,8 +38,8 @@ abstract class CommentsLinks { /// * nested lists /// /// Not working for Java: - /// * typedef: [bool] - /// * top level typedef: [bool] + /// * typedef: [Comments_Usefulness] + /// * top level typedef: [CommentsTypeCollection_TypeCollectionTypedef] /// /// Not working for Swift: /// * named comment: [][Comments.veryUseful] diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart index 61974175d1..0fac1fe5e1 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart @@ -10,9 +10,9 @@ abstract class DeprecationComments { /// This is some very useful interface. @Deprecated("Unfortunately, this interface is deprecated. Use [Comments] instead.") factory DeprecationComments( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda, + DeprecationComments_Usefulness Function(String) someMethodWithAllCommentsLambda, + DeprecationComments_Usefulness Function() isSomePropertyGetLambda, + void Function(DeprecationComments_Usefulness) isSomePropertySetLambda, String Function() propertyButNotAccessorsGetLambda, void Function(String) propertyButNotAccessorsSetLambda ) => DeprecationComments$Lambdas( @@ -24,27 +24,30 @@ abstract class DeprecationComments { ); /// This is some very useful constant. @Deprecated("Unfortunately, this constant is deprecated. Use [Comments.veryUseful] instead.") - static final bool veryUseful = true; + static final DeprecationComments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [DeprecationComments_Usefulness]. Usefulness of the input /// @Deprecated("Unfortunately, this method is deprecated.\nUse [Comments.someMethodWithAllComments] instead.") - bool someMethodWithAllComments(String input); + DeprecationComments_Usefulness someMethodWithAllComments(String input); /// Gets some very useful property. @Deprecated("Unfortunately, this property's getter is deprecated.\nUse [Comments.isSomeProperty] instead.") - bool get isSomeProperty; + DeprecationComments_Usefulness get isSomeProperty; /// Sets some very useful property. @Deprecated("Unfortunately, this property's setter is deprecated.\nUse [Comments.isSomeProperty] instead.") - set isSomeProperty(bool value); + set isSomeProperty(DeprecationComments_Usefulness value); /// Gets the property but not accessors. @Deprecated("Will be removed in v3.2.1.") String get propertyButNotAccessors; @Deprecated("Will be removed in v3.2.1.") set propertyButNotAccessors(String value); } +/// This is some very useful typedef. +@Deprecated("Unfortunately, this typedef is deprecated. Use [Comments_Usefulness] instead.") +typedef DeprecationComments_Usefulness = bool; /// This is some very useful enum. @Deprecated("Unfortunately, this enum is deprecated. Use [Comments_SomeEnum] instead.") enum DeprecationComments_SomeEnum { @@ -109,7 +112,7 @@ class DeprecationComments_SomethingWrongException implements Exception { class DeprecationComments_SomeStruct { /// How useful this struct is. @Deprecated("Unfortunately, this field is deprecated.\nUse [Comments_SomeStruct.someField] instead.") - bool someField; + DeprecationComments_Usefulness someField; DeprecationComments_SomeStruct._(this.someField); DeprecationComments_SomeStruct() : someField = false; @@ -196,9 +199,9 @@ final _smokeDeprecationcommentsGetTypeId = __lib.catchArgumentError(() => __lib. Pointer Function(Pointer) >('library_smoke_DeprecationComments_get_type_id')); class DeprecationComments$Lambdas implements DeprecationComments { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + DeprecationComments_Usefulness Function(String) someMethodWithAllCommentsLambda; + DeprecationComments_Usefulness Function() isSomePropertyGetLambda; + void Function(DeprecationComments_Usefulness) isSomePropertySetLambda; String Function() propertyButNotAccessorsGetLambda; void Function(String) propertyButNotAccessorsSetLambda; DeprecationComments$Lambdas( @@ -209,12 +212,12 @@ class DeprecationComments$Lambdas implements DeprecationComments { this.propertyButNotAccessorsSetLambda ); @override - bool someMethodWithAllComments(String input) => + DeprecationComments_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + DeprecationComments_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(DeprecationComments_Usefulness value) => isSomePropertySetLambda(value); @override String get propertyButNotAccessors => propertyButNotAccessorsGetLambda(); @override @@ -223,7 +226,7 @@ class DeprecationComments$Lambdas implements DeprecationComments { class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationComments { DeprecationComments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + DeprecationComments_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_DeprecationComments_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -237,7 +240,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } /// Gets some very useful property. @Deprecated("Unfortunately, this property's getter is deprecated.\nUse [Comments.isSomeProperty] instead.") - bool get isSomeProperty { + DeprecationComments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_DeprecationComments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -249,7 +252,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } /// Sets some very useful property. @Deprecated("Unfortunately, this property's setter is deprecated.\nUse [Comments.isSomeProperty] instead.") - set isSomeProperty(bool value) { + set isSomeProperty(DeprecationComments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_DeprecationComments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -278,7 +281,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } } int _smokeDeprecationcommentssomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + DeprecationComments_Usefulness? _resultObject; try { _resultObject = (_obj as DeprecationComments).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart index b9d367a4f4..7d07751437 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart @@ -8,27 +8,29 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class DeprecationCommentsOnly { @Deprecated("Unfortunately, this interface is deprecated.") factory DeprecationCommentsOnly( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda + DeprecationCommentsOnly_Usefulness Function(String) someMethodWithAllCommentsLambda, + DeprecationCommentsOnly_Usefulness Function() isSomePropertyGetLambda, + void Function(DeprecationCommentsOnly_Usefulness) isSomePropertySetLambda ) => DeprecationCommentsOnly$Lambdas( someMethodWithAllCommentsLambda, isSomePropertyGetLambda, isSomePropertySetLambda ); @Deprecated("Unfortunately, this constant is deprecated.") - static final bool veryUseful = true; + static final DeprecationCommentsOnly_Usefulness veryUseful = true; /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [DeprecationCommentsOnly_Usefulness]. Usefulness of the input /// @Deprecated("Unfortunately, this method is deprecated.") - bool someMethodWithAllComments(String input); + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input); @Deprecated("Unfortunately, this property's getter is deprecated.") - bool get isSomeProperty; + DeprecationCommentsOnly_Usefulness get isSomeProperty; @Deprecated("Unfortunately, this property's setter is deprecated.") - set isSomeProperty(bool value); + set isSomeProperty(DeprecationCommentsOnly_Usefulness value); } +@Deprecated("Unfortunately, this typedef is deprecated.") +typedef DeprecationCommentsOnly_Usefulness = bool; @Deprecated("Unfortunately, this enum is deprecated.") enum DeprecationCommentsOnly_SomeEnum { @Deprecated("Unfortunately, this item is deprecated.") @@ -84,7 +86,7 @@ void smokeDeprecationcommentsonlySomeenumReleaseFfiHandleNullable(Pointer @Deprecated("Unfortunately, this struct is deprecated.") class DeprecationCommentsOnly_SomeStruct { @Deprecated("Unfortunately, this field is deprecated.") - bool someField; + DeprecationCommentsOnly_Usefulness someField; DeprecationCommentsOnly_SomeStruct._(this.someField); DeprecationCommentsOnly_SomeStruct() : someField = false; @@ -171,26 +173,26 @@ final _smokeDeprecationcommentsonlyGetTypeId = __lib.catchArgumentError(() => __ Pointer Function(Pointer) >('library_smoke_DeprecationCommentsOnly_get_type_id')); class DeprecationCommentsOnly$Lambdas implements DeprecationCommentsOnly { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + DeprecationCommentsOnly_Usefulness Function(String) someMethodWithAllCommentsLambda; + DeprecationCommentsOnly_Usefulness Function() isSomePropertyGetLambda; + void Function(DeprecationCommentsOnly_Usefulness) isSomePropertySetLambda; DeprecationCommentsOnly$Lambdas( this.someMethodWithAllCommentsLambda, this.isSomePropertyGetLambda, this.isSomePropertySetLambda ); @override - bool someMethodWithAllComments(String input) => + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + DeprecationCommentsOnly_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(DeprecationCommentsOnly_Usefulness value) => isSomePropertySetLambda(value); } class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements DeprecationCommentsOnly { DeprecationCommentsOnly$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_DeprecationCommentsOnly_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -203,7 +205,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } @Deprecated("Unfortunately, this property's getter is deprecated.") - bool get isSomeProperty { + DeprecationCommentsOnly_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_DeprecationCommentsOnly_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -214,7 +216,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } @Deprecated("Unfortunately, this property's setter is deprecated.") - set isSomeProperty(bool value) { + set isSomeProperty(DeprecationCommentsOnly_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_DeprecationCommentsOnly_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -223,7 +225,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } int _smokeDeprecationcommentsonlysomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + DeprecationCommentsOnly_Usefulness? _resultObject; try { _resultObject = (_obj as DeprecationCommentsOnly).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart index fbb01533a8..e898c60dac 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart @@ -9,28 +9,31 @@ abstract class ExcludedComments { /// This is some very useful constant. /// @nodoc - static final bool veryUseful = true; + static final ExcludedComments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [inputParameter] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [ExcludedComments_Usefulness]. Usefulness of the input /// /// Throws [ExcludedComments_SomethingWrongException]. Sometimes it happens. /// /// @nodoc - bool someMethodWithAllComments(String inputParameter); + ExcludedComments_Usefulness someMethodWithAllComments(String inputParameter); /// This is some very useful method that does nothing. /// /// @nodoc void someMethodWithoutReturnTypeOrInputParameters(); /// Gets some very useful property. /// @nodoc - bool get isSomeProperty; + ExcludedComments_Usefulness get isSomeProperty; /// Sets some very useful property. /// @nodoc - set isSomeProperty(bool value); + set isSomeProperty(ExcludedComments_Usefulness value); } +/// This is some very useful typealias. +/// @nodoc +typedef ExcludedComments_Usefulness = bool; /// This is some very useful enum. /// @nodoc enum ExcludedComments_SomeEnum { @@ -97,7 +100,7 @@ class ExcludedComments_SomeStruct { /// How useful this struct is /// remains to be seen /// @nodoc - bool someField; + ExcludedComments_Usefulness someField; /// This is how easy it is to construct. /// [someField] How useful this struct is /// remains to be seen @@ -288,7 +291,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments ExcludedComments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String inputParameter) { + ExcludedComments_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_ExcludedComments_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -318,7 +321,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } @override - bool get isSomeProperty { + ExcludedComments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_ExcludedComments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -329,7 +332,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments } } @override - set isSomeProperty(bool value) { + set isSomeProperty(ExcludedComments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_ExcludedComments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart index a0bd10301f..dab9fcd9c4 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart @@ -7,17 +7,19 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class ExcludedCommentsOnly { /// @nodoc - static final bool veryUseful = true; + static final ExcludedCommentsOnly_Usefulness veryUseful = true; /// @nodoc - bool someMethodWithAllComments(String inputParameter); + ExcludedCommentsOnly_Usefulness someMethodWithAllComments(String inputParameter); /// @nodoc void someMethodWithoutReturnTypeOrInputParameters(); /// @nodoc - bool get isSomeProperty; + ExcludedCommentsOnly_Usefulness get isSomeProperty; /// @nodoc - set isSomeProperty(bool value); + set isSomeProperty(ExcludedCommentsOnly_Usefulness value); } /// @nodoc +typedef ExcludedCommentsOnly_Usefulness = bool; +/// @nodoc enum ExcludedCommentsOnly_SomeEnum { /// @nodoc useless @@ -77,7 +79,7 @@ class ExcludedCommentsOnly_SomethingWrongException implements Exception { /// @nodoc class ExcludedCommentsOnly_SomeStruct { /// @nodoc - bool someField; + ExcludedCommentsOnly_Usefulness someField; ExcludedCommentsOnly_SomeStruct(this.someField); } // ExcludedCommentsOnly_SomeStruct "private" section, not exported. @@ -264,7 +266,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm ExcludedCommentsOnly$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String inputParameter) { + ExcludedCommentsOnly_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_ExcludedCommentsOnly_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -294,7 +296,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } @override - bool get isSomeProperty { + ExcludedCommentsOnly_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_ExcludedCommentsOnly_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -305,7 +307,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm } } @override - set isSomeProperty(bool value) { + set isSomeProperty(ExcludedCommentsOnly_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_ExcludedCommentsOnly_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart index f433e7f7a1..0e71d17d03 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart @@ -10,11 +10,11 @@ abstract class UnicodeComments { /// /// [input] שלום /// - /// Returns [bool]. товарищ + /// Returns [Comments_Usefulness]. товарищ /// /// Throws [Comments_SomethingWrongException]. ネコ /// - bool someMethodWithAllComments(String input); + Comments_Usefulness someMethodWithAllComments(String input); } // UnicodeComments "private" section, not exported. final _smokeUnicodecommentsRegisterFinalizer = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -49,7 +49,7 @@ class UnicodeComments$Impl extends __lib.NativeBase implements UnicodeComments { UnicodeComments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + Comments_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_UnicodeComments_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart index ec8b078995..968463534a 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart @@ -1,4 +1,5 @@ import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/smoke/dates_steady.dart'; import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; final _foobarListofDateCreateHandle = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -118,7 +119,7 @@ final _foobarListofDateStd2chrono2steady1clock2time1pointIteratorGet = __lib.cat Uint64 Function(Pointer), int Function(Pointer) >('library_foobar_ListOf_Date_std_2chrono_2steady_1clock_2time_1point_iterator_get')); -Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List value) { +Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List value) { final _result = _foobarListofDateStd2chrono2steady1clock2time1pointCreateHandle(); for (final element in value) { final _elementHandle = dateToFfi(element); @@ -127,8 +128,8 @@ Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(Pointer handle) { - final result = List.empty(growable: true); +List foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(Pointer handle) { + final result = List.empty(growable: true); final _iteratorHandle = _foobarListofDateStd2chrono2steady1clock2time1pointIterator(handle); while (_foobarListofDateStd2chrono2steady1clock2time1pointIteratorIsValid(handle, _iteratorHandle) != 0) { final _elementHandle = _foobarListofDateStd2chrono2steady1clock2time1pointIteratorGet(_iteratorHandle); @@ -155,14 +156,14 @@ final _foobarListofDateStd2chrono2steady1clock2time1pointGetValueNullable = __li Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_ListOf_Date_std_2chrono_2steady_1clock_2time_1point_get_value_nullable')); -Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfiNullable(List? value) { +Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfiNullable(List? value) { if (value == null) return Pointer.fromAddress(0); final _handle = foobarListofDateStd2chrono2steady1clock2time1pointToFfi(value); final result = _foobarListofDateStd2chrono2steady1clock2time1pointCreateHandleNullable(_handle); foobarListofDateStd2chrono2steady1clock2time1pointReleaseFfiHandle(_handle); return result; } -List? foobarListofDateStd2chrono2steady1clock2time1pointFromFfiNullable(Pointer handle) { +List? foobarListofDateStd2chrono2steady1clock2time1pointFromFfiNullable(Pointer handle) { if (handle.address == 0) return null; final _handle = _foobarListofDateStd2chrono2steady1clock2time1pointGetValueNullable(handle); final result = foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(_handle); @@ -207,7 +208,7 @@ final _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorGetValue Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_MapOf_Date_std_2chrono_2steady_1clock_2time_1point_to_String_iterator_get_value')); -Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map value) { +Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map value) { final _result = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringCreateHandle(); for (final entry in value.entries) { final _keyHandle = dateToFfi(entry.key); @@ -218,8 +219,8 @@ Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map } return _result; } -Map foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(Pointer handle) { - final result = Map(); +Map foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(Pointer handle) { + final result = Map(); final _iteratorHandle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIterator(handle); while (_foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorIsValid(handle, _iteratorHandle) != 0) { final _keyHandle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorGetKey(_iteratorHandle); @@ -249,14 +250,14 @@ final _foobarMapofDateStd2chrono2steady1clock2time1pointToStringGetValueNullable Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_MapOf_Date_std_2chrono_2steady_1clock_2time_1point_to_String_get_value_nullable')); -Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfiNullable(Map? value) { +Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfiNullable(Map? value) { if (value == null) return Pointer.fromAddress(0); final _handle = foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(value); final result = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringCreateHandleNullable(_handle); foobarMapofDateStd2chrono2steady1clock2time1pointToStringReleaseFfiHandle(_handle); return result; } -Map? foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfiNullable(Pointer handle) { +Map? foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfiNullable(Pointer handle) { if (handle.address == 0) return null; final _handle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringGetValueNullable(handle); final result = foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(_handle); diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/date_defaults_aliased.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/date_defaults_aliased.dart index b5e91ca8ef..c2e76a8bd1 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/date_defaults_aliased.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/date_defaults_aliased.dart @@ -1,11 +1,12 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/smoke/date_alias.dart'; class DateDefaultsAliased { - DateTime dateTime; - DateTime dateTimeUtc; - DateTime beforeEpoch; - DateTime exactlyEpoch; + DateAlias dateTime; + DateAlias dateTimeUtc; + DateAlias beforeEpoch; + DateAlias exactlyEpoch; DateDefaultsAliased._(this.dateTime, this.dateTimeUtc, this.beforeEpoch, this.exactlyEpoch); DateDefaultsAliased() : dateTime = DateTime.fromMillisecondsSinceEpoch(1643966117000), dateTimeUtc = DateTime.fromMillisecondsSinceEpoch(1643966117000), beforeEpoch = DateTime.fromMillisecondsSinceEpoch(-1511793883000), exactlyEpoch = DateTime.fromMillisecondsSinceEpoch(0); diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart index f4c2a40a97..3a68a28e21 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart @@ -12,6 +12,9 @@ abstract class Dates { Set get dateSet; set dateSet(Set value); } +typedef Dates_DateTypeDef = DateTime; +typedef Dates_DateArray = List; +typedef Dates_DateMap = Map; class Dates_DateStruct { DateTime dateField; DateTime? nullableDateField; diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart index b4607265d3..ca3bc2b1f7 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart @@ -5,15 +5,18 @@ import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/generic_types__conversion.dart'; abstract class DatesSteady { - DateTime dateMethod(DateTime input); - DateTime? nullableDateMethod(DateTime? input); - List dateListMethod(List input); + DatesSteady_MonotonicDate dateMethod(DatesSteady_MonotonicDate input); + DatesSteady_MonotonicDate? nullableDateMethod(DatesSteady_MonotonicDate? input); + DatesSteady_DateList dateListMethod(DatesSteady_DateList input); } +typedef DatesSteady_MonotonicDate = DateTime; +typedef DatesSteady_DateList = List; +typedef DatesSteady_DateMap = Map; class DatesSteady_DateStruct { - DateTime dateField; - DateTime? nullableDateField; + DatesSteady_MonotonicDate dateField; + DatesSteady_MonotonicDate? nullableDateField; DatesSteady_DateStruct._(this.dateField, this.nullableDateField); - DatesSteady_DateStruct(DateTime dateField) + DatesSteady_DateStruct(DatesSteady_MonotonicDate dateField) : dateField = dateField, nullableDateField = null; } // DatesSteady_DateStruct "private" section, not exported. @@ -101,7 +104,7 @@ final _smokeDatessteadyReleaseHandle = __lib.catchArgumentError(() => __lib.nati class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { DatesSteady$Impl(Pointer handle) : super(handle); @override - DateTime dateMethod(DateTime input) { + DatesSteady_MonotonicDate dateMethod(DatesSteady_MonotonicDate input) { final _dateMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint64), int Function(Pointer, int, int)>('library_smoke_DatesSteady_dateMethod__Date')); final _inputHandle = dateToFfi(input); final _handle = this.handle; @@ -114,7 +117,7 @@ class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { } } @override - DateTime? nullableDateMethod(DateTime? input) { + DatesSteady_MonotonicDate? nullableDateMethod(DatesSteady_MonotonicDate? input) { final _nullableDateMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_DatesSteady_nullableDateMethod__Date_')); final _inputHandle = dateToFfiNullable(input); final _handle = this.handle; @@ -127,7 +130,7 @@ class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { } } @override - List dateListMethod(List input) { + DatesSteady_DateList dateListMethod(DatesSteady_DateList input) { final _dateListMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_DatesSteady_dateListMethod__ListOf_Date_std_2chrono_2steady_1clock_2time_1point')); final _inputHandle = foobarListofDateStd2chrono2steady1clock2time1pointToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart index 6cf6497fc9..a90130ee63 100644 --- a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart +++ b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart @@ -11,6 +11,12 @@ abstract class DefaultValues { @visibleForTesting static dynamic $prototype = DefaultValues$Impl(Pointer.fromAddress(0)); } +typedef DefaultValues_LongTypedef = int; +typedef DefaultValues_BooleanTypedef = bool; +typedef DefaultValues_StringTypedef = String; +typedef DefaultValues_FloatArray = List; +typedef DefaultValues_IdToStringMap = Map; +typedef DefaultValues_StringSet = Set; class DefaultValues_StructWithDefaults { int intField; int uintField; @@ -331,10 +337,10 @@ void smokeDefaultvaluesStructwithspecialdefaultsReleaseFfiHandleNullable(Pointer // End of DefaultValues_StructWithSpecialDefaults "private" section. class DefaultValues_StructWithEmptyDefaults { List intsField; - List floatsField; - Map mapField; + DefaultValues_FloatArray floatsField; + DefaultValues_IdToStringMap mapField; DefaultValues_StructWithDefaults structField; - Set setTypeField; + DefaultValues_StringSet setTypeField; DefaultValues_StructWithEmptyDefaults._(this.intsField, this.floatsField, this.mapField, this.structField, this.setTypeField); DefaultValues_StructWithEmptyDefaults() : intsField = [], floatsField = [], mapField = {}, structField = DefaultValues_StructWithDefaults(), setTypeField = {}; @@ -436,9 +442,9 @@ void smokeDefaultvaluesStructwithemptydefaultsReleaseFfiHandleNullable(Pointer intsField; - List floatsField; - Set setTypeField; - Map mapField; + DefaultValues_FloatArray floatsField; + DefaultValues_StringSet setTypeField; + DefaultValues_IdToStringMap mapField; StructWithInitializerDefaults._(this.intsField, this.floatsField, this.setTypeField, this.mapField); StructWithInitializerDefaults() : intsField = [4, -2, 42], floatsField = [3.14, double.negativeInfinity], setTypeField = {"foo", "bar"}, mapField = {1: "foo", 42: "bar"}; diff --git a/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults.dart b/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults.dart index 351c1d6b54..e27173f518 100644 --- a/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults.dart +++ b/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults.dart @@ -9,6 +9,7 @@ import 'package:library/src/fire/enum4.dart'; import 'package:library/src/smoke/enum_wrapper.dart'; abstract class EnumDefaults { } +typedef EnumDefaults_EnumAlias = Enum3; class EnumDefaults_SimpleEnum { Enum1 enumField; EnumDefaults_SimpleEnum._(this.enumField); @@ -152,7 +153,7 @@ void smokeEnumdefaultsNullableenumReleaseFfiHandleNullable(Pointer handle) _smokeEnumdefaultsNullableenumReleaseHandleNullable(handle); // End of EnumDefaults_NullableEnum "private" section. class EnumDefaults_AliasEnum { - Enum3 enumField; + EnumDefaults_EnumAlias enumField; EnumDefaults_AliasEnum._(this.enumField); EnumDefaults_AliasEnum() : enumField = Enum3.disabled; diff --git a/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults_external.dart b/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults_external.dart index 9e4ef2c222..c803a97c6e 100644 --- a/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults_external.dart +++ b/gluecodium/src/test/resources/smoke/defaults_const/output/dart/lib/src/smoke/enum_defaults_external.dart @@ -12,6 +12,7 @@ import 'package:library/src/fire/external_enum3.dart'; import 'package:library/src/smoke/enum_wrapper.dart'; abstract class EnumDefaultsExternal { } +typedef EnumDefaultsExternal_EnumAlias = alien_enum3.ExternalEnum3; class EnumDefaultsExternal_SimpleEnum { alien_enum1.ExternalEnum1 enumField; EnumDefaultsExternal_SimpleEnum._(this.enumField); @@ -155,7 +156,7 @@ void smokeEnumdefaultsexternalNullableenumReleaseFfiHandleNullable(Pointer _smokeEnumdefaultsexternalNullableenumReleaseHandleNullable(handle); // End of EnumDefaultsExternal_NullableEnum "private" section. class EnumDefaultsExternal_AliasEnum { - alien_enum3.alien_enum3.ExternalEnum3 enumField; + EnumDefaultsExternal_EnumAlias enumField; EnumDefaultsExternal_AliasEnum._(this.enumField); EnumDefaultsExternal_AliasEnum() : enumField = alien_enum3.ExternalEnum3.disabled; diff --git a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart index d52fd84253..b12fbaa9c1 100644 --- a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart +++ b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class DurationMilliseconds { Duration durationFunction(Duration input); @@ -10,6 +11,11 @@ abstract class DurationMilliseconds { Duration get durationProperty; set durationProperty(Duration value); } +typedef DurationMilliseconds_DurationTypeAlias = Duration; +typedef DurationMilliseconds_DurationList = List; +typedef DurationMilliseconds_DurationSet = Set; +typedef DurationMilliseconds_DurationMap = Map; +typedef DurationMilliseconds_DurationKeyMap = Map; class DurationMilliseconds_DurationStruct { Duration durationField; DurationMilliseconds_DurationStruct(this.durationField); diff --git a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart index b2626e6dbc..cd10a55f23 100644 --- a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart +++ b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class DurationSeconds { Duration durationFunction(Duration input); @@ -10,6 +11,11 @@ abstract class DurationSeconds { Duration get durationProperty; set durationProperty(Duration value); } +typedef DurationSeconds_DurationTypeAlias = Duration; +typedef DurationSeconds_DurationList = List; +typedef DurationSeconds_DurationSet = Set; +typedef DurationSeconds_DurationMap = Map; +typedef DurationSeconds_DurationKeyMap = Map; class DurationSeconds_DurationStruct { Duration durationField; DurationSeconds_DurationStruct(this.durationField); diff --git a/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart b/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart index b811dc1a02..236e57855c 100644 --- a/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart +++ b/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; import 'package:meta/meta.dart'; abstract class Enums { @@ -14,6 +15,7 @@ abstract class Enums { @visibleForTesting static dynamic $prototype = Enums$Impl(Pointer.fromAddress(0)); } +typedef Enums_ExampleMap = Map; enum Enums_SimpleEnum { first, second diff --git a/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart b/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart index 6336bba019..cd0aff89e6 100644 --- a/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart +++ b/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart @@ -5,6 +5,7 @@ import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/generic_types__conversion.dart'; class Equatable { } +typedef Equatable_ErrorCodeToMessageMap = Map; enum Equatable_SomeEnum { foo, bar @@ -70,7 +71,7 @@ class Equatable_EquatableStruct { Equatable_NestedEquatableStruct structField; Equatable_SomeEnum enumField; List arrayField; - Map mapField; + Equatable_ErrorCodeToMessageMap mapField; Equatable_EquatableStruct(this.boolField, this.intField, this.longField, this.floatField, this.doubleField, this.stringField, this.structField, this.enumField, this.arrayField, this.mapField); @override bool operator ==(Object other) { @@ -246,7 +247,7 @@ class Equatable_EquatableNullableStruct { Equatable_NestedEquatableStruct? structField; Equatable_SomeEnum? enumField; List? arrayField; - Map? mapField; + Equatable_ErrorCodeToMessageMap? mapField; Equatable_EquatableNullableStruct._(this.boolField, this.intField, this.uintField, this.floatField, this.stringField, this.structField, this.enumField, this.arrayField, this.mapField); Equatable_EquatableNullableStruct() : boolField = null, intField = null, uintField = null, floatField = null, stringField = null, structField = null, enumField = null, arrayField = null, mapField = null; diff --git a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart index fbe858aaad..1841420abf 100644 --- a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart +++ b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart @@ -10,7 +10,7 @@ import 'package:library/src/package/types.dart'; import 'package:meta/meta.dart'; abstract class Class implements Interface { factory Class() => $prototype.constructor(); - Types_Struct fun(List double); + Types_Struct fun(Types_ULong double); Types_Enum get property; set property(Types_Enum value); /// @nodoc @@ -67,7 +67,7 @@ class Class$Impl extends __lib.NativeBase implements Class { return __resultHandle; } @override - Types_Struct fun(List double) { + Types_Struct fun(Types_ULong double) { final _funFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_package_Class_fun__ListOf_package_Types_Struct')); final _doubleHandle = foobarListofPackageTypesStructToFfi(double); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart index 7975f58627..c4d82ab2a3 100644 --- a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart +++ b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart @@ -1,8 +1,10 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; +import 'package:library/src/generic_types__conversion.dart'; class Types { static final Types_Enum Const = Types_Enum.naN; } +typedef Types_ULong = List; enum Types_Enum { naN } diff --git a/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart b/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart index 7cbad04b90..293cc29a88 100644 --- a/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart +++ b/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart @@ -8,9 +8,9 @@ abstract class GenericTypesWithBasicTypes { List methodWithList(List input); Map methodWithMap(Map input); Set methodWithSet(Set input); - List methodWithListTypeAlias(List input); - Map methodWithMapTypeAlias(Map input); - Set methodWithSetTypeAlias(Set input); + GenericTypesWithBasicTypes_BasicList methodWithListTypeAlias(GenericTypesWithBasicTypes_BasicList input); + GenericTypesWithBasicTypes_BasicMap methodWithMapTypeAlias(GenericTypesWithBasicTypes_BasicMap input); + GenericTypesWithBasicTypes_BasicSet methodWithSetTypeAlias(GenericTypesWithBasicTypes_BasicSet input); List get listProperty; set listProperty(List value); Map get mapProperty; @@ -18,6 +18,9 @@ abstract class GenericTypesWithBasicTypes { Set get setProperty; set setProperty(Set value); } +typedef GenericTypesWithBasicTypes_BasicList = List; +typedef GenericTypesWithBasicTypes_BasicMap = Map; +typedef GenericTypesWithBasicTypes_BasicSet = Set; class GenericTypesWithBasicTypes_StructWithGenerics { List numbersList; Map numbersMap; @@ -158,7 +161,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - List methodWithListTypeAlias(List input) { + GenericTypesWithBasicTypes_BasicList methodWithListTypeAlias(GenericTypesWithBasicTypes_BasicList input) { final _methodWithListTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithListTypeAlias__ListOf_String')); final _inputHandle = foobarListofStringToFfi(input); final _handle = this.handle; @@ -171,7 +174,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - Map methodWithMapTypeAlias(Map input) { + GenericTypesWithBasicTypes_BasicMap methodWithMapTypeAlias(GenericTypesWithBasicTypes_BasicMap input) { final _methodWithMapTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithMapTypeAlias__MapOf_String_to_String')); final _inputHandle = foobarMapofStringToStringToFfi(input); final _handle = this.handle; @@ -184,7 +187,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - Set methodWithSetTypeAlias(Set input) { + GenericTypesWithBasicTypes_BasicSet methodWithSetTypeAlias(GenericTypesWithBasicTypes_BasicSet input) { final _methodWithSetTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithSetTypeAlias__SetOf_String')); final _inputHandle = foobarSetofStringToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart index 80d1cabae5..e1c153e067 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart @@ -12,7 +12,7 @@ abstract class CalculatorListener { void Function(double) onCalculationResultConstLambda, void Function(CalculatorListener_ResultStruct) onCalculationResultStructLambda, void Function(List) onCalculationResultArrayLambda, - void Function(Map) onCalculationResultMapLambda, + void Function(CalculatorListener_NamedCalculationResults) onCalculationResultMapLambda, void Function(CalculationResult) onCalculationResultInstanceLambda, ) => CalculatorListener$Lambdas( onCalculationResultLambda, @@ -27,9 +27,10 @@ abstract class CalculatorListener { void onCalculationResultConst(double calculationResult); void onCalculationResultStruct(CalculatorListener_ResultStruct calculationResult); void onCalculationResultArray(List calculationResult); - void onCalculationResultMap(Map calculationResults); + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults); void onCalculationResultInstance(CalculationResult calculationResult); } +typedef CalculatorListener_NamedCalculationResults = Map; class CalculatorListener_ResultStruct { double result; CalculatorListener_ResultStruct(this.result); @@ -118,7 +119,7 @@ class CalculatorListener$Lambdas implements CalculatorListener { void Function(double) onCalculationResultConstLambda; void Function(CalculatorListener_ResultStruct) onCalculationResultStructLambda; void Function(List) onCalculationResultArrayLambda; - void Function(Map) onCalculationResultMapLambda; + void Function(CalculatorListener_NamedCalculationResults) onCalculationResultMapLambda; void Function(CalculationResult) onCalculationResultInstanceLambda; CalculatorListener$Lambdas( this.onCalculationResultLambda, @@ -142,7 +143,7 @@ class CalculatorListener$Lambdas implements CalculatorListener { void onCalculationResultArray(List calculationResult) => onCalculationResultArrayLambda(calculationResult); @override - void onCalculationResultMap(Map calculationResults) => + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults) => onCalculationResultMapLambda(calculationResults); @override void onCalculationResultInstance(CalculationResult calculationResult) => @@ -182,7 +183,7 @@ class CalculatorListener$Impl extends __lib.NativeBase implements CalculatorList foobarListofDoubleReleaseFfiHandle(_calculationResultHandle); } @override - void onCalculationResultMap(Map calculationResults) { + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults) { final _onCalculationResultMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_CalculatorListener_onCalculationResultMap__MapOf_String_to_Double')); final _calculationResultsHandle = foobarMapofStringToDoubleToFfi(calculationResults); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart index 7bccab1f79..57a9a90b6c 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart @@ -19,8 +19,8 @@ abstract class ListenerWithProperties { void Function(ListenerWithProperties_ResultEnum) enumeratedMessageSetLambda, List Function() arrayedMessageGetLambda, void Function(List) arrayedMessageSetLambda, - Map Function() mappedMessageGetLambda, - void Function(Map) mappedMessageSetLambda, + ListenerWithProperties_StringToDouble Function() mappedMessageGetLambda, + void Function(ListenerWithProperties_StringToDouble) mappedMessageSetLambda, Uint8List Function() bufferedMessageGetLambda, void Function(Uint8List) bufferedMessageSetLambda ) => ListenerWithProperties$Lambdas( @@ -50,11 +50,12 @@ abstract class ListenerWithProperties { set enumeratedMessage(ListenerWithProperties_ResultEnum value); List get arrayedMessage; set arrayedMessage(List value); - Map get mappedMessage; - set mappedMessage(Map value); + ListenerWithProperties_StringToDouble get mappedMessage; + set mappedMessage(ListenerWithProperties_StringToDouble value); Uint8List get bufferedMessage; set bufferedMessage(Uint8List value); } +typedef ListenerWithProperties_StringToDouble = Map; enum ListenerWithProperties_ResultEnum { none, result @@ -204,8 +205,8 @@ class ListenerWithProperties$Lambdas implements ListenerWithProperties { void Function(ListenerWithProperties_ResultEnum) enumeratedMessageSetLambda; List Function() arrayedMessageGetLambda; void Function(List) arrayedMessageSetLambda; - Map Function() mappedMessageGetLambda; - void Function(Map) mappedMessageSetLambda; + ListenerWithProperties_StringToDouble Function() mappedMessageGetLambda; + void Function(ListenerWithProperties_StringToDouble) mappedMessageSetLambda; Uint8List Function() bufferedMessageGetLambda; void Function(Uint8List) bufferedMessageSetLambda; ListenerWithProperties$Lambdas( @@ -246,9 +247,9 @@ class ListenerWithProperties$Lambdas implements ListenerWithProperties { @override set arrayedMessage(List value) => arrayedMessageSetLambda(value); @override - Map get mappedMessage => mappedMessageGetLambda(); + ListenerWithProperties_StringToDouble get mappedMessage => mappedMessageGetLambda(); @override - set mappedMessage(Map value) => mappedMessageSetLambda(value); + set mappedMessage(ListenerWithProperties_StringToDouble value) => mappedMessageSetLambda(value); @override Uint8List get bufferedMessage => bufferedMessageGetLambda(); @override @@ -342,7 +343,7 @@ class ListenerWithProperties$Impl extends __lib.NativeBase implements ListenerWi _setFfi(_handle, __lib.LibraryContext.isolateId, _valueHandle); foobarListofStringReleaseFfiHandle(_valueHandle); } - Map get mappedMessage { + ListenerWithProperties_StringToDouble get mappedMessage { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_ListenerWithProperties_mappedMessage_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -352,7 +353,7 @@ class ListenerWithProperties$Impl extends __lib.NativeBase implements ListenerWi foobarMapofStringToDoubleReleaseFfiHandle(__resultHandle); } } - set mappedMessage(Map value) { + set mappedMessage(ListenerWithProperties_StringToDouble value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_ListenerWithProperties_mappedMessage_set__MapOf_String_to_Double')); final _valueHandle = foobarMapofStringToDoubleToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart index 4257979822..d8d4172767 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart @@ -13,7 +13,7 @@ abstract class ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct Function() fetchDataStructLambda, ListenersWithReturnValues_ResultEnum Function() fetchDataEnumLambda, List Function() fetchDataArrayLambda, - Map Function() fetchDataMapLambda, + ListenersWithReturnValues_StringToDouble Function() fetchDataMapLambda, CalculationResult Function() fetchDataInstanceLambda, ) => ListenersWithReturnValues$Lambdas( fetchDataDoubleLambda, @@ -30,9 +30,10 @@ abstract class ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct fetchDataStruct(); ListenersWithReturnValues_ResultEnum fetchDataEnum(); List fetchDataArray(); - Map fetchDataMap(); + ListenersWithReturnValues_StringToDouble fetchDataMap(); CalculationResult fetchDataInstance(); } +typedef ListenersWithReturnValues_StringToDouble = Map; enum ListenersWithReturnValues_ResultEnum { none, result @@ -177,7 +178,7 @@ class ListenersWithReturnValues$Lambdas implements ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct Function() fetchDataStructLambda; ListenersWithReturnValues_ResultEnum Function() fetchDataEnumLambda; List Function() fetchDataArrayLambda; - Map Function() fetchDataMapLambda; + ListenersWithReturnValues_StringToDouble Function() fetchDataMapLambda; CalculationResult Function() fetchDataInstanceLambda; ListenersWithReturnValues$Lambdas( this.fetchDataDoubleLambda, @@ -205,7 +206,7 @@ class ListenersWithReturnValues$Lambdas implements ListenersWithReturnValues { List fetchDataArray() => fetchDataArrayLambda(); @override - Map fetchDataMap() => + ListenersWithReturnValues_StringToDouble fetchDataMap() => fetchDataMapLambda(); @override CalculationResult fetchDataInstance() => @@ -269,7 +270,7 @@ class ListenersWithReturnValues$Impl extends __lib.NativeBase implements Listene } } @override - Map fetchDataMap() { + ListenersWithReturnValues_StringToDouble fetchDataMap() { final _fetchDataMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_ListenersWithReturnValues_fetchDataMap')); final _handle = this.handle; final __resultHandle = _fetchDataMapFfi(_handle, __lib.LibraryContext.isolateId); @@ -337,7 +338,7 @@ int _smokeListenerswithreturnvaluesfetchDataArrayStatic(Object _obj, Pointer> _result) { - Map? _resultObject; + ListenersWithReturnValues_StringToDouble? _resultObject; try { _resultObject = (_obj as ListenersWithReturnValues).fetchDataMap(); _result.value = foobarMapofStringToDoubleToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart b/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart index 8725db868b..3bd3838779 100644 --- a/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart +++ b/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart @@ -4,12 +4,18 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class Locales { Locale localeMethod(Locale input); Locale get localeProperty; set localeProperty(Locale value); } +typedef Locales_LocaleTypeDef = Locale; +typedef Locales_LocaleArray = List; +typedef Locales_LocaleMap = Map; +typedef Locales_LocaleSet = Set; +typedef Locales_LocaleKeyMap = Map; class Locales_LocaleStruct { Locale localeField; Locales_LocaleStruct(this.localeField); diff --git a/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart b/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart index 0af75913c3..c2230c20ad 100644 --- a/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart +++ b/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart @@ -11,12 +11,14 @@ abstract class MethodOverloads { bool isBooleanString(String input); bool isBooleanPoint(MethodOverloads_Point input); bool isBooleanMulti(bool input1, int input2, String input3, MethodOverloads_Point input4); - bool isBooleanStringArray(List input); - bool isBooleanIntArray(List input); + bool isBooleanStringArray(MethodOverloads_StringArray input); + bool isBooleanIntArray(MethodOverloads_IntArray input); bool isBooleanConst(); bool isFloatString(String input); - bool isFloatList(List input); + bool isFloatList(MethodOverloads_IntArray input); } +typedef MethodOverloads_StringArray = List; +typedef MethodOverloads_IntArray = List; class MethodOverloads_Point { double x; double y; @@ -173,7 +175,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isBooleanStringArray(List input) { + bool isBooleanStringArray(MethodOverloads_StringArray input) { final _isBooleanStringArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isBoolean__ListOf_String')); final _inputHandle = foobarListofStringToFfi(input); final _handle = this.handle; @@ -186,7 +188,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isBooleanIntArray(List input) { + bool isBooleanIntArray(MethodOverloads_IntArray input) { final _isBooleanIntArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isBoolean__ListOf_Byte')); final _inputHandle = foobarListofByteToFfi(input); final _handle = this.handle; @@ -223,7 +225,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isFloatList(List input) { + bool isFloatList(MethodOverloads_IntArray input) { final _isFloatListFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isFloat__ListOf_Byte')); final _inputHandle = foobarListofByteToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/outer_struct.dart b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/outer_struct.dart index 4d46b0e111..b7199da26a 100644 --- a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/outer_struct.dart +++ b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/outer_struct.dart @@ -28,6 +28,7 @@ class OuterStruct { @visibleForTesting static dynamic $prototype = OuterStruct$Impl(); } +typedef OuterStruct_TypeAlias = OuterStruct_InnerEnum; enum OuterStruct_InnerEnum { foo, bar @@ -84,7 +85,7 @@ void smokeOuterstructInnerenumReleaseFfiHandleNullable(Pointer handle) => _smokeOuterstructInnerenumReleaseHandleNullable(handle); // End of OuterStruct_InnerEnum "private" section. class OuterStruct_InstantiationException implements Exception { - final OuterStruct_InnerEnum error; + final OuterStruct_TypeAlias error; OuterStruct_InstantiationException(this.error); } class OuterStruct_InnerStruct { diff --git a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart index dfe912505f..4b6c518904 100644 --- a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart +++ b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart @@ -6,9 +6,9 @@ import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/smoke/free_enum.dart'; import 'package:library/src/smoke/free_exception.dart'; import 'package:library/src/smoke/free_point.dart'; +import 'package:library/src/smoke/free_type_def.dart'; abstract class UseFreeTypes { - - DateTime doStuff(FreePoint point, FreeEnum mode); + FreeTypeDef doStuff(FreePoint point, FreeEnum mode); } // UseFreeTypes "private" section, not exported. final _smokeUsefreetypesRegisterFinalizer = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -41,9 +41,8 @@ final _doStuffReturnHasError = __lib.catchArgumentError(() => __lib.nativeLibrar >('library_smoke_UseFreeTypes_doStuff__FreePoint_FreeEnum_return_has_error')); class UseFreeTypes$Impl extends __lib.NativeBase implements UseFreeTypes { UseFreeTypes$Impl(Pointer handle) : super(handle); - @override - DateTime doStuff(FreePoint point, FreeEnum mode) { + FreeTypeDef doStuff(FreePoint point, FreeEnum mode) { final _doStuffFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer, Uint32), Pointer Function(Pointer, int, Pointer, int)>('library_smoke_UseFreeTypes_doStuff__FreePoint_FreeEnum')); final _pointHandle = smokeFreepointToFfi(point); final _modeHandle = smokeFreeenumToFfi(mode); diff --git a/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart b/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart index 2a8bd8c5a3..76fe0459a5 100644 --- a/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart +++ b/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart @@ -12,9 +12,9 @@ abstract class Nullable { int? methodWithInt(int? input); Nullable_SomeStruct? methodWithSomeStruct(Nullable_SomeStruct? input); Nullable_SomeEnum? methodWithSomeEnum(Nullable_SomeEnum? input); - List? methodWithSomeArray(List? input); + Nullable_SomeArray? methodWithSomeArray(Nullable_SomeArray? input); List? methodWithInlineArray(List? input); - Map? methodWithSomeMap(Map? input); + Nullable_SomeMap? methodWithSomeMap(Nullable_SomeMap? input); SomeInterface? methodWithInstance(SomeInterface? input); String? get stringProperty; set stringProperty(String? value); @@ -28,15 +28,17 @@ abstract class Nullable { set structProperty(Nullable_SomeStruct? value); Nullable_SomeEnum? get enumProperty; set enumProperty(Nullable_SomeEnum? value); - List? get arrayProperty; - set arrayProperty(List? value); + Nullable_SomeArray? get arrayProperty; + set arrayProperty(Nullable_SomeArray? value); List? get inlineArrayProperty; set inlineArrayProperty(List? value); - Map? get mapProperty; - set mapProperty(Map? value); + Nullable_SomeMap? get mapProperty; + set mapProperty(Nullable_SomeMap? value); SomeInterface? get instanceProperty; set instanceProperty(SomeInterface? value); } +typedef Nullable_SomeArray = List; +typedef Nullable_SomeMap = Map; enum Nullable_SomeEnum { on, off @@ -162,9 +164,9 @@ class Nullable_NullableStruct { double? doubleField; Nullable_SomeStruct? structField; Nullable_SomeEnum? enumField; - List? arrayField; + Nullable_SomeArray? arrayField; List? inlineArrayField; - Map? mapField; + Nullable_SomeMap? mapField; SomeInterface? instanceField; Nullable_NullableStruct._(this.stringField, this.boolField, this.doubleField, this.structField, this.enumField, this.arrayField, this.inlineArrayField, this.mapField, this.instanceField); Nullable_NullableStruct() @@ -532,7 +534,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - List? methodWithSomeArray(List? input) { + Nullable_SomeArray? methodWithSomeArray(Nullable_SomeArray? input) { final _methodWithSomeArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Nullable_methodWithSomeArray__ListOf_String_')); final _inputHandle = foobarListofStringToFfiNullable(input); final _handle = this.handle; @@ -558,7 +560,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - Map? methodWithSomeMap(Map? input) { + Nullable_SomeMap? methodWithSomeMap(Nullable_SomeMap? input) { final _methodWithSomeMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Nullable_methodWithSomeMap__MapOf_Long_to_String_')); final _inputHandle = foobarMapofLongToStringToFfiNullable(input); final _handle = this.handle; @@ -698,7 +700,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { smokeNullableSomeenumReleaseFfiHandleNullable(_valueHandle); } @override - List? get arrayProperty { + Nullable_SomeArray? get arrayProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_Nullable_arrayProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -709,7 +711,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - set arrayProperty(List? value) { + set arrayProperty(Nullable_SomeArray? value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_Nullable_arrayProperty_set__ListOf_String_')); final _valueHandle = foobarListofStringToFfiNullable(value); final _handle = this.handle; @@ -736,7 +738,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { foobarListofStringReleaseFfiHandleNullable(_valueHandle); } @override - Map? get mapProperty { + Nullable_SomeMap? get mapProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_Nullable_mapProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -747,7 +749,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - set mapProperty(Map? value) { + set mapProperty(Nullable_SomeMap? value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_Nullable_mapProperty_set__MapOf_Long_to_String_')); final _valueHandle = foobarMapofLongToStringToFfiNullable(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart b/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart index 092a30e98c..8565945a16 100644 --- a/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart +++ b/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart @@ -4,6 +4,7 @@ import 'package:library/src/builtin_types__conversion.dart'; import 'package:meta/meta.dart'; class weeTypes { } +typedef weeTypes_BasicTypedef = double; enum weeTypes_werrEnum { WEE_ITEM } diff --git a/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart b/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart index ee251fd1d6..9a12061ce4 100644 --- a/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart +++ b/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart @@ -16,6 +16,7 @@ abstract class Structs { @visibleForTesting static dynamic $prototype = Structs$Impl(Pointer.fromAddress(0)); } +typedef Structs_ArrayOfImmutable = List; enum Structs_FooBar { foo, bar @@ -519,7 +520,7 @@ void smokeStructsDoublenestingimmutablestructReleaseFfiHandleNullable(Pointer arrayField; + Structs_ArrayOfImmutable arrayField; Structs_StructWithArrayOfImmutable(this.arrayField); } // Structs_StructWithArrayOfImmutable "private" section, not exported. diff --git a/gluecodium/src/test/resources/smoke/typedefs/output/dart/lib/src/smoke/type_defs.dart b/gluecodium/src/test/resources/smoke/typedefs/output/dart/lib/src/smoke/type_defs.dart index 514472eebb..6662601a03 100644 --- a/gluecodium/src/test/resources/smoke/typedefs/output/dart/lib/src/smoke/type_defs.dart +++ b/gluecodium/src/test/resources/smoke/typedefs/output/dart/lib/src/smoke/type_defs.dart @@ -12,7 +12,7 @@ abstract class TypeDefs { static TypeDefs_NestedIntTypeDef returnNestedIntTypeDef(TypeDefs_NestedIntTypeDef input) => $prototype.returnNestedIntTypeDef(input); static TypeDefs_TestStructTypeDef returnTestStructTypeDef(TypeDefs_TestStructTypeDef input) => $prototype.returnTestStructTypeDef(input); static TypeDefs_NestedStructTypeDef returnNestedStructTypeDef(TypeDefs_NestedStructTypeDef input) => $prototype.returnNestedStructTypeDef(input); - static PointTypeDef returnTypeDefPointFromTypeCollection(PointTypeDef input) => $prototype.returnTypeDefPointFromTypeCollection(input); + static TypeCollection_PointTypeDef returnTypeDefPointFromTypeCollection(TypeCollection_PointTypeDef input) => $prototype.returnTypeDefPointFromTypeCollection(input); List get primitiveTypeProperty; set primitiveTypeProperty(List value); /// @nodoc @@ -219,7 +219,7 @@ class TypeDefs$Impl extends __lib.NativeBase implements TypeDefs { smokeTypedefsTeststructReleaseFfiHandle(__resultHandle); } } - PointTypeDef returnTypeDefPointFromTypeCollection(PointTypeDef input) { + TypeCollection_PointTypeDef returnTypeDefPointFromTypeCollection(TypeCollection_PointTypeDef input) { final _returnTypeDefPointFromTypeCollectionFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Int32, Pointer), Pointer Function(int, Pointer)>('library_smoke_TypeDefs_returnTypeDefPointFromTypeCollection__Point')); final _inputHandle = smokeTypecollectionPointToFfi(input); final __resultHandle = _returnTypeDefPointFromTypeCollectionFfi(__lib.LibraryContext.isolateId, _inputHandle); diff --git a/gluecodium/src/test/resources/smoke/visibility_internal/output/dart/lib/src/smoke/public_class.dart b/gluecodium/src/test/resources/smoke/visibility_internal/output/dart/lib/src/smoke/public_class.dart index 7189f21edd..270a5ef4f2 100644 --- a/gluecodium/src/test/resources/smoke/visibility_internal/output/dart/lib/src/smoke/public_class.dart +++ b/gluecodium/src/test/resources/smoke/visibility_internal/output/dart/lib/src/smoke/public_class.dart @@ -3,9 +3,16 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class PublicClass { } /// @nodoc +typedef _PublicClass_InternalArray = List; +/// @nodoc +typedef _PublicClass_InternalStructTypeDef = PublicClass_InternalStruct; +/// @nodoc +typedef _PublicClass_StringToInternalStructMap = Map; +/// @nodoc enum PublicClass_InternalEnum { foo, bar