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

com.redhat.ceylon.common.tool.Option Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.redhat.ceylon.common.tool;

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

/**
 * Annotates a setter to be called with the value {@code true} if the 
 * option appears in a command line.
 * @see OptionArgument
 * @see Argument
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Option {

    public static final char NO_SHORT = '\0';
    
    /** 
     * The name of the option (without the initial {@code --}). 
     * Defaults to a name based on the setter name
     */
    String longName() default "";
    
    /**
     * The short option (without the initial {@code -}). 
     * If not given the option has no short name.
     */
    char shortName() default NO_SHORT;
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy