net.jbock.util.ParsingFailed Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbock Show documentation
Show all versions of jbock Show documentation
jbock annotations and utils
The newest version!
package net.jbock.util;
import net.jbock.model.CommandModel;
/**
* Superclass of non-exceptional failure objects that can occur
* during command line parsing.
*
* There are a fixed number of subclasses:
*
*
* - {@link ErrAtFile}
*
- {@link ErrConvert}
*
- {@link ErrMissingItem}
*
- {@link ErrToken}
*
*/
public abstract class ParsingFailed {
private final CommandModel commandModel;
ParsingFailed(CommandModel commandModel) {
this.commandModel = commandModel;
}
/**
* Returns a complete model of the annotated class, to generate
* usage documentation or failure messages.
*
* @return command model
*/
public CommandModel commandModel() {
return commandModel;
}
/**
* Returns an error message that describes the error.
*
* @return the error message
*/
public abstract String message();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy