Class AbstractCommonRestriction
java.lang.Object
com.github.rvesse.airline.restrictions.AbstractCommonRestriction
- All Implemented Interfaces:
ArgumentsRestriction, OptionRestriction
- Direct Known Subclasses:
AbstractAllowedValuesRestriction, AbstractRequiredUnlessRestriction, AbstractStringRestriction, IsRequiredRestriction, MultipleOfRestriction, None, OccurrencesRestriction, PartialRestriction, PathRestriction, PatternRestriction, PortRestriction, PositiveNegativeRestriction, RangeRestriction
public abstract class AbstractCommonRestriction
extends Object
implements OptionRestriction, ArgumentsRestriction
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voidfinalValidate(ParseState<T> state, ArgumentsMetadata arguments) Method that is called after Airline has completed parsing<T> voidfinalValidate(ParseState<T> state, OptionMetadata option) Method that is called after Airline has completed parsingstatic <T> StringgetArgumentTitle(ArgumentsMetadata arguments, int argIndex) static <T> StringgetArgumentTitle(ParseState<T> state, ArgumentsMetadata arguments) static <T> StringgetOptionTitle(ParseState<T> state, OptionMetadata option) <T> voidpostValidate(ParseState<T> state, ArgumentsMetadata arguments, Object value) Method that is called after Airline has converted a string argument received into a strongly typed Java value<T> voidpostValidate(ParseState<T> state, OptionMetadata option, Object value) Method that is called after Airline has converted a string argument received into a strongly typed Java value<T> voidpreValidate(ParseState<T> state, ArgumentsMetadata arguments, String value) Method that is called before Airline attempts to convert a string argument received into a strongly typed Java value<T> voidpreValidate(ParseState<T> state, OptionMetadata option, String value) Method that is called before Airline attempts to convert a string argument received into a strongly typed Java value
-
Constructor Details
-
AbstractCommonRestriction
public AbstractCommonRestriction()
-
-
Method Details
-
finalValidate
Description copied from interface:OptionRestrictionMethod that is called after Airline has completed parsingThis can be used to implement restrictions that require the final parser state to process
- Specified by:
finalValidatein interfaceOptionRestriction- Parameters:
state- Parser stateoption- Option meta-data
-
postValidate
Description copied from interface:OptionRestrictionMethod that is called after Airline has converted a string argument received into a strongly typed Java value- Specified by:
postValidatein interfaceOptionRestriction- Parameters:
state- Parser stateoption- Option meta-datavalue- Strongly typed value
-
preValidate
Description copied from interface:OptionRestrictionMethod that is called before Airline attempts to convert a string argument received into a strongly typed Java value- Specified by:
preValidatein interfaceOptionRestriction- Parameters:
state- Parser stateoption- Option meta-datavalue- String value
-
preValidate
Description copied from interface:ArgumentsRestrictionMethod that is called before Airline attempts to convert a string argument received into a strongly typed Java value- Specified by:
preValidatein interfaceArgumentsRestriction- Parameters:
state- Parser statearguments- Arguments meta-datavalue- String value
-
postValidate
Description copied from interface:ArgumentsRestrictionMethod that is called after Airline has converted a string argument received into a strongly typed Java value- Specified by:
postValidatein interfaceArgumentsRestriction- Parameters:
state- Parser statearguments- Arguments meta-datavalue- Strongly typed value
-
finalValidate
Description copied from interface:ArgumentsRestrictionMethod that is called after Airline has completed parsingThis can be used to implement restrictions that require the final parser state to process
- Specified by:
finalValidatein interfaceArgumentsRestriction- Parameters:
state- Parser statearguments- Arguments meta-data
-
getOptionTitle
-
getArgumentTitle
-
getArgumentTitle
-