Package ninja.params
Class ParsingArrayExtractor<X>
- java.lang.Object
-
- ninja.params.ParsingArrayExtractor<X>
-
- All Implemented Interfaces:
ArgumentExtractor<X>
public class ParsingArrayExtractor<X> extends Object implements ArgumentExtractor<X>
Argument extractor that parses the String[] argument into a X[]
-
-
Constructor Summary
Constructors Constructor Description ParsingArrayExtractor(ArgumentExtractor<? extends String[]> wrapped, ParamParsers.ArrayParamParser<?> parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X
extract(Context context)
Extract the argument from the contextClass<X>
getExtractedType()
Get the type of the argument that is extractedString
getFieldName()
Get the field name that is being extracted, if this value is extracted from a field
-
-
-
Constructor Detail
-
ParsingArrayExtractor
public ParsingArrayExtractor(ArgumentExtractor<? extends String[]> wrapped, ParamParsers.ArrayParamParser<?> parser)
-
-
Method Detail
-
extract
public X extract(Context context)
Description copied from interface:ArgumentExtractor
Extract the argument from the context- Specified by:
extract
in interfaceArgumentExtractor<X>
- Parameters:
context
- The argument to extract- Returns:
- The extracted argument
-
getExtractedType
public Class<X> getExtractedType()
Description copied from interface:ArgumentExtractor
Get the type of the argument that is extracted- Specified by:
getExtractedType
in interfaceArgumentExtractor<X>
- Returns:
- The type of the argument that is being extracted
-
getFieldName
public String getFieldName()
Description copied from interface:ArgumentExtractor
Get the field name that is being extracted, if this value is extracted from a field- Specified by:
getFieldName
in interfaceArgumentExtractor<X>
- Returns:
- The field name, or null if the argument isn't extracted from a named field
-
-