
com.github.yin.flags.FlagMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-flags Show documentation
Show all versions of java-flags Show documentation
Easy to use command-line parser, which enables you to
define cmdline flags directly the class they are used in.
package com.github.yin.flags;
import com.google.auto.value.AutoValue;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* Stores description and other flag attributes.
* @author yin
*/
@AutoValue
public abstract class FlagMetadata implements Comparable {
public static FlagMetadata create(String className, String flagName, String desc, Flag> flag) {
return new AutoValue_FlagMetadata(FlagID.create(className, flagName), desc, flag);
}
public abstract FlagID flagID();
@Nullable public abstract String desc();
public abstract Flag> flag();
public final int compareTo(@Nonnull FlagMetadata that) {
return this.flagID().compareTo(that.flagID());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy