1

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?

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108

2 Answers2

1

You can use org.jetbrains.annotations.Nullable & org.jetbrains.annotations.NotNull annotations available from jetbrains dependency,

implementation 'org.jetbrains:annotations:20.1.0'

Gowtham GS
  • 478
  • 2
  • 5
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.