You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NonNull.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  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. package org.eclipse.jgit.annotations;
  11. import static java.lang.annotation.ElementType.FIELD;
  12. import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
  13. import static java.lang.annotation.ElementType.METHOD;
  14. import static java.lang.annotation.ElementType.PARAMETER;
  15. import java.lang.annotation.Documented;
  16. import java.lang.annotation.Retention;
  17. import java.lang.annotation.RetentionPolicy;
  18. import java.lang.annotation.Target;
  19. /**
  20. * JGit's replacement for the {@code javax.annotation.Nonnull}.
  21. * <p>
  22. * Denotes that a local variable, parameter, field, method return value is expected
  23. * to be non {@code null}.
  24. *
  25. * @since 4.2
  26. */
  27. @Documented
  28. @Retention(RetentionPolicy.CLASS)
  29. @Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })
  30. public @interface NonNull {
  31. // marker annotation with no members
  32. }