Module com.github.rvesse.airline
Class AllowedRawValuesRestriction
java.lang.Object
com.github.rvesse.airline.restrictions.AbstractCommonRestriction
com.github.rvesse.airline.restrictions.common.AbstractAllowedValuesRestriction
com.github.rvesse.airline.restrictions.common.AllowedRawValuesRestriction
- 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
ConstructorsConstructorDescriptionAllowedRawValuesRestriction
(boolean ignoreCase, Locale locale, String... values) -
Method Summary
Modifier and TypeMethodDescription<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 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, postValidate, postValidate
-
Field Details
-
locale
-
-
Constructor Details
-
AllowedRawValuesRestriction
-
-
Method Details
-
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
- Overrides:
preValidate
in classAbstractCommonRestriction
- 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
- Overrides:
preValidate
in classAbstractCommonRestriction
- Parameters:
state
- Parser statearguments
- Arguments meta-datavalue
- String value
-