There are many arguments in my code which can take the value null. It would be helpful if there is a @Nullable and @NonNull annotation like the ones offered in Android via Annotation.
Is there an alternative available in Harmony OS?
There are many arguments in my code which can take the value null. It would be helpful if there is a @Nullable and @NonNull annotation like the ones offered in Android via Annotation.
Is there an alternative available in Harmony OS?
You can use org.jetbrains.annotations.Nullable & org.jetbrains.annotations.NotNull annotations available from jetbrains dependency,
implementation 'org.jetbrains:annotations:20.1.0'
You can refer to this link and use all the hidden android APIs
https://github.com/anggrayudi/android-hidden-api
From there I ported the annotation interfaces present in the android.annotation package into Harmony OS library that I am making.