static fun checkNotNull(obj: Any!, varName: String!): Unit
static fun <T : Any!> checkNotNull(reference: T): T
Ensures that an object reference passed as a parameter to the calling method is not null.
reference
- T: an object reference
NullPointerException
- if reference
is null
Return
T: the non-null reference that was validated