Module com.github.rvesse.airline
Interface ArgumentsRestriction
- All Known Implementing Classes:
AbstractAllowedValuesRestriction
,AbstractCommonRestriction
,AbstractLocaleAndCaseStringRestriction
,AbstractRequiredUnlessRestriction
,AbstractStringRestriction
,AllowedEnumValuesRestriction
,AllowedRawValuesRestriction
,AllowedValuesRestriction
,EndsWithRestriction
,IsRequiredRestriction
,LengthRestriction
,MultipleOfRestriction
,None
,NoOptionLikeValuesRestriction
,NotBlankRestriction
,NotEmptyRestriction
,OccurrencesRestriction
,PartialRestriction
,PathRestriction
,PatternRestriction
,PortRestriction
,PositiveNegativeRestriction
,RangeRestriction
,RequiredUnlessEnvironmentRestriction
,StartsWithRestriction
public interface ArgumentsRestriction
Represents restrictions on arguments
-
Method Summary
Modifier and TypeMethodDescription<T> void
finalValidate
(ParseState<T> state, ArgumentsMetadata arguments) Method that is called after Airline has completed parsing<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
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
-
Method Details
-
preValidate
Method that is called before Airline attempts to convert a string argument received into a strongly typed Java value- Parameters:
state
- Parser statearguments
- Arguments meta-datavalue
- String value
-
postValidate
Method that is called after Airline has converted a string argument received into a strongly typed Java value- Parameters:
state
- Parser statearguments
- Arguments meta-datavalue
- Strongly typed value
-
finalValidate
Method that is called after Airline has completed parsingThis can be used to implement restrictions that require the final parser state to process
- Parameters:
state
- Parser statearguments
- Arguments meta-data
-