All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.args.Argument Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
package panda.args;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * Argument of the command line. This works mostly like {@link Option} except the following
 * differences.
 * 
    *
  1. Arguments have an index about their relative position on the command line. *
*/ @Retention(RUNTIME) @Target({ FIELD, METHOD, PARAMETER }) public @interface Argument { /** * Position of the argument. *

* If you define multiple single value properties to bind to arguments, they should have * {@code index=0, index=1, index=2}, ... and so on. *

* Multiple value properties bound to arguments must be always the last entry. */ int index() default -1; /** * Name of the argument. */ String name(); /** * See {@link Option#usage()}. */ String usage() default ""; /** * See {@link Option#required()}. */ boolean required() default false; /** * See {@link Option#hidden()}. */ boolean hidden() default false; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy