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.

Command.java 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> 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.pgm;
  11. import static java.lang.annotation.ElementType.TYPE;
  12. import static java.lang.annotation.RetentionPolicy.RUNTIME;
  13. import java.lang.annotation.Retention;
  14. import java.lang.annotation.Target;
  15. /**
  16. * Annotation to document a {@link org.eclipse.jgit.pgm.TextBuiltin}.
  17. * <p>
  18. * This is an optional annotation for TextBuiltin subclasses and it carries
  19. * documentation forward into the runtime system describing what the command is
  20. * and why users may want to invoke it.
  21. */
  22. @Retention(RUNTIME)
  23. @Target( { TYPE })
  24. public @interface Command {
  25. /**
  26. * Get the command name
  27. *
  28. * @return name the command is invoked as from the command line. If the
  29. * (default) empty string is supplied the name will be generated
  30. * from the class name.
  31. */
  32. public String name() default "";
  33. /**
  34. * Get command description
  35. *
  36. * @return one line description of the command's feature set.
  37. */
  38. public String usage() default "";
  39. /**
  40. * If this command is considered to be commonly used
  41. *
  42. * @return true if this command is considered to be commonly used.
  43. */
  44. public boolean common() default false;
  45. }