Lines Matching full:reference
173 * Ensures that an object reference passed as a parameter to the calling
176 * @param reference an object reference
177 * @return the non-null reference that was validated
178 * @throws NullPointerException if {@code reference} is null
180 public static <T> T checkNotNull(T reference) {
181 if (reference == null) {
184 return reference;
188 * Ensures that an object reference passed as a parameter to the calling
191 * @param reference an object reference
194 * @return the non-null reference that was validated
195 * @throws NullPointerException if {@code reference} is null
197 public static <T> T checkNotNull(T reference, Object errorMessage) {
198 if (reference == null) {
201 return reference;
205 * Ensures that an object reference passed as a parameter to the calling
208 * @param reference an object reference
218 * @return the non-null reference that was validated
219 * @throws NullPointerException if {@code reference} is null
221 public static <T> T checkNotNull(T reference, String errorMessageTemplate,
223 if (reference == null) {
228 return reference;