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

com.github.yin.cli.FlagMetadata Maven / Gradle / Ivy

package com.github.yin.cli;

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, Class type) {
        return new AutoValue_FlagMetadata(FlagID.create(className, flagName), desc, type);
    }
    public abstract FlagID flagID();
    @Nullable public abstract String desc();
    public abstract Class type();

    public final int compareTo(@Nonnull FlagMetadata that) {
        return this.flagID().compareTo(that.flagID());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy