Lines Matching defs:reference
168 * Ensures that an object reference passed as a parameter to the calling
171 * @param reference an object reference
172 * @return the non-null reference that was validated
173 * @throws NullPointerException if {@code reference} is null
175 public static <T> T checkNotNull(T reference) {
176 if (reference == null) {
179 return reference;
183 * Ensures that an object reference passed as a parameter to the calling
186 * @param reference an object reference
189 * @return the non-null reference that was validated
190 * @throws NullPointerException if {@code reference} is null
192 public static <T> T checkNotNull(T reference, Object errorMessage) {
193 if (reference == null) {
196 return reference;
200 * Ensures that an object reference passed as a parameter to the calling
203 * @param reference an object reference
213 * @return the non-null reference that was validated
214 * @throws NullPointerException if {@code reference} is null
216 public static <T> T checkNotNull(T reference, String errorMessageTemplate,
218 if (reference == null) {
223 return reference;