I’m having a class member variable that cannot be null but cannot be initialised upon instance creation. Therefore I’m using Delegates.notNull().
However, is there a way to know if the variable has been set without triggering the IllegalStateException thrown by the notNull Delegate?
Why I’m doing this? Because I’m having “client code” that’s responsible for setting the variable to something (before it’s ready by any other code), but I don’t want readers of the variable to worry about the null state of the variable (that will never happen).