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 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> 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 valueMethods inherited from class AbstractAllowedValuesRestriction
asObjects, getAllowedValues, getContentBlock, getFormat, getPreamble, numContentBlocksMethods inherited from class AbstractCommonRestriction
finalValidate, finalValidate, getArgumentTitle, getArgumentTitle, getOptionTitle, preValidate, preValidate
-
Field Details
-
currentState
-
allowedValues
-
-
Constructor Details
-
AllowedValuesRestriction
-
-
Method Details
-
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- Overrides:
postValidatein 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:ArgumentsRestrictionMethod that is called after Airline has converted a string argument received into a strongly typed Java value- Specified by:
postValidatein interfaceArgumentsRestriction- Overrides:
postValidatein classAbstractCommonRestriction- Parameters:
state- Parser statearguments- Arguments meta-datavalue- Strongly typed value
-