Package ninja.params
Class ArgumentExtractors.AttributeExtractor
- java.lang.Object
-
- ninja.params.ArgumentExtractors.AttributeExtractor
-
- All Implemented Interfaces:
ArgumentExtractor<Object>
- Enclosing class:
- ArgumentExtractors
public static class ArgumentExtractors.AttributeExtractor extends Object implements ArgumentExtractor<Object>
-
-
Constructor Summary
Constructors Constructor Description AttributeExtractor(Attribute attribute, ArgumentClassHolder attributeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectextract(Context context)Extract the argument from the contextClassgetExtractedType()Get the type of the argument that is extractedStringgetFieldName()Get the field name that is being extracted, if this value is extracted from a field
-
-
-
Constructor Detail
-
AttributeExtractor
@Inject public AttributeExtractor(Attribute attribute, ArgumentClassHolder attributeType)
-
-
Method Detail
-
extract
public Object extract(Context context)
Description copied from interface:ArgumentExtractorExtract the argument from the context- Specified by:
extractin interfaceArgumentExtractor<Object>- Parameters:
context- The argument to extract- Returns:
- The extracted argument
-
getExtractedType
public Class getExtractedType()
Description copied from interface:ArgumentExtractorGet the type of the argument that is extracted- Specified by:
getExtractedTypein interfaceArgumentExtractor<Object>- Returns:
- The type of the argument that is being extracted
-
getFieldName
public String getFieldName()
Description copied from interface:ArgumentExtractorGet the field name that is being extracted, if this value is extracted from a field- Specified by:
getFieldNamein interfaceArgumentExtractor<Object>- Returns:
- The field name, or null if the argument isn't extracted from a named field
-
-