Interface NullSafe


  • public interface NullSafe
    Marker extension interface that injects getter calls in a way that if a getter is called on a field with value null it throws an NullSafetyException.

    This of course gives no real protection of null-pointer cases. It just gives a sort of an early detection during runtime. A more recommended way to prevent null errors is to work with mandatory and optional fields, for example by using Java's Optional in conjunction with IBean's Completable, ClassicBeanStyleWithOptionalSupport, ModernBeanStyle.