Module com.github.rvesse.airline
Class AllowedValuesRestriction
java.lang.Object
com.github.rvesse.airline.restrictions.AbstractCommonRestriction
com.github.rvesse.airline.restrictions.common.AbstractAllowedValuesRestriction
com.github.rvesse.airline.restrictions.common.AllowedValuesRestriction
- All Implemented Interfaces:
HelpHint
,ArgumentsRestriction
,OptionRestriction
-
Field Summary
FieldsFields inherited from class com.github.rvesse.airline.restrictions.common.AbstractAllowedValuesRestriction
CASE_INSENSITIVE, CASE_SENSITIVE, caseInsensitive, rawValues
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAllowedValues
(ParseState<T> state, String title, Class<?> type, TypeConverter converter) <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 valueMethods inherited from class com.github.rvesse.airline.restrictions.common.AbstractAllowedValuesRestriction
asObjects, getAllowedValues, getContentBlock, getFormat, getPreamble, numContentBlocks
Methods inherited from class com.github.rvesse.airline.restrictions.AbstractCommonRestriction
finalValidate, finalValidate, getArgumentTitle, getArgumentTitle, getOptionTitle, preValidate, preValidate
-
Field Details
-
currentState
-
allowedValues
-
-
Constructor Details
-
AllowedValuesRestriction
-
-
Method Details
-
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
- Overrides:
postValidate
in classAbstractCommonRestriction
- Parameters:
state
- Parser stateoption
- Option meta-datavalue
- Strongly typed value
-
createAllowedValues
protected <T> Set<Object> createAllowedValues(ParseState<T> state, String title, Class<?> type, TypeConverter converter) -
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
- Overrides:
postValidate
in classAbstractCommonRestriction
- Parameters:
state
- Parser statearguments
- Arguments meta-datavalue
- Strongly typed value
-