Module com.github.rvesse.airline
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> void
finalValidate
(ParseState<T> state, ArgumentsMetadata arguments) Method that is called after Airline has completed parsing<T> void
finalValidate
(ParseState<T> state, OptionMetadata option) Method that is called after Airline has completed parsingstatic <T> String
getArgumentTitle
(ArgumentsMetadata arguments, int argIndex) static <T> String
getArgumentTitle
(ParseState<T> state, ArgumentsMetadata arguments) static <T> String
getOptionTitle
(ParseState<T> state, OptionMetadata option) <T> void
postValidate
(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> void
postValidate
(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> void
preValidate
(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> void
preValidate
(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:OptionRestriction
Method that is called after Airline has completed parsingThis can be used to implement restrictions that require the final parser state to process
- Specified by:
finalValidate
in interfaceOptionRestriction
- Parameters:
state
- Parser stateoption
- Option meta-data
-
postValidate
Description copied from interface:OptionRestriction
Method that is called after Airline has converted a string argument received into a strongly typed Java value- Specified by:
postValidate
in interfaceOptionRestriction
- Parameters:
state
- Parser stateoption
- Option meta-datavalue
- Strongly typed value
-
preValidate
Description copied from interface:OptionRestriction
Method that is called before Airline attempts to convert a string argument received into a strongly typed Java value- Specified by:
preValidate
in interfaceOptionRestriction
- Parameters:
state
- Parser stateoption
- Option meta-datavalue
- String value
-
preValidate
Description copied from interface:ArgumentsRestriction
Method that is called before Airline attempts to convert a string argument received into a strongly typed Java value- Specified by:
preValidate
in interfaceArgumentsRestriction
- Parameters:
state
- Parser statearguments
- Arguments meta-datavalue
- String value
-
postValidate
Description copied from interface:ArgumentsRestriction
Method that is called after Airline has converted a string argument received into a strongly typed Java value- Specified by:
postValidate
in interfaceArgumentsRestriction
- Parameters:
state
- Parser statearguments
- Arguments meta-datavalue
- Strongly typed value
-
finalValidate
Description copied from interface:ArgumentsRestriction
Method that is called after Airline has completed parsingThis can be used to implement restrictions that require the final parser state to process
- Specified by:
finalValidate
in interfaceArgumentsRestriction
- Parameters:
state
- Parser statearguments
- Arguments meta-data
-
getOptionTitle
-
getArgumentTitle
-
getArgumentTitle
-