Skip to content

Commit

Permalink
abstract base mixin class!
Browse files Browse the repository at this point in the history
  • Loading branch information
HosseinYousefi committed Oct 7, 2024
1 parent bdb45b5 commit de23aec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkgs/jnigen/docs/interface_implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Runnable extends JObject {
) { /* ... */ }
}
abstract mixin class $Runnable {
abstract base mixin class $Runnable {
factory $Runnable({
required void Function() run,
bool run$async,
Expand Down Expand Up @@ -87,7 +87,7 @@ implementing the interface in Java instead of using the lambdas:
```java
// Java
public class Printer with Runnable {
public class Printer implements Runnable {
private final String text;
public Printer(String text) {
Expand All @@ -108,7 +108,7 @@ You can do the same in Dart by creating a subclass that implements `$Runnable`:
```dart
// Dart
class Printer with $Runnable {
final class Printer with $Runnable {
final String text;
Printer(this.text);
Expand Down Expand Up @@ -145,7 +145,7 @@ Similarly, when subclassing
```dart
// Dart
class Printer with $Runnable {
final class Printer with $Runnable {
final String text;
Printer(this.text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ void registerTests(String groupName, TestRunnerCallback test) {
});
}

class DartStringToIntParser implements $StringConverter {
final class DartStringToIntParser with $StringConverter {
final int radix;

DartStringToIntParser({required this.radix});
Expand All @@ -1004,7 +1004,7 @@ class DartStringToIntParser implements $StringConverter {
}
}

class AsyncRunnable with $MyRunnable {
final class AsyncRunnable with $MyRunnable {
final Completer<void> completer;

AsyncRunnable(this.completer);
Expand Down

0 comments on commit de23aec

Please sign in to comment.