View Javadoc
1   /*
2    * Copyright (C) 2015, Andrey Loskutov <loskutov@gmx.de> and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  
11  package org.eclipse.jgit.annotations;
12  
13  import static java.lang.annotation.ElementType.FIELD;
14  import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
15  import static java.lang.annotation.ElementType.METHOD;
16  import static java.lang.annotation.ElementType.PARAMETER;
17  
18  import java.lang.annotation.Documented;
19  import java.lang.annotation.Retention;
20  import java.lang.annotation.RetentionPolicy;
21  import java.lang.annotation.Target;
22  
23  /**
24   * JGit's replacement for the {@code javax.annotation.Nonnull}.
25   * <p>
26   * Denotes that a local variable, parameter, field, method return value is expected
27   * to be non {@code null}.
28   *
29   * @since 4.2
30   */
31  @Documented
32  @Retention(RetentionPolicy.CLASS)
33  @Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })
34  public @interface NonNull {
35  	// marker annotation with no members
36  }