ninja.params
Interface ArgumentExtractor<T>

All Known Implementing Classes:
ArgumentExtractors.BodyAsExtractor, ArgumentExtractors.ContextExtractor, ArgumentExtractors.FlashExtractor, ArgumentExtractors.HttpServletRequestExtractor, ArgumentExtractors.HttpServletResponseExtractor, ArgumentExtractors.ParamExtractor, ArgumentExtractors.PathParamExtractor, ArgumentExtractors.SessionExtractor, ArgumentExtractors.SessionParamExtractor, ArgumentExtractors.ValidationExtractor, ParsingArgumentExtractor, ValidatingArgumentExtractor

public interface ArgumentExtractor<T>

Extracts a controller argument from the context

Author:
James Roper

Method Summary
 T extract(Context context)
          Extract the argument from the context
 Class<T> getExtractedType()
          Get the type of the argument that is extracted
 String getFieldName()
          Get the field name that is being extracted, if this value is extracted from a field
 

Method Detail

extract

T extract(Context context)
Extract the argument from the context

Parameters:
context - The argument to extract
Returns:
The extracted argument

getExtractedType

Class<T> getExtractedType()
Get the type of the argument that is extracted

Returns:
The type of the argument that is being extracted

getFieldName

String getFieldName()
Get the field name that is being extracted, if this value is extracted from a field

Returns:
The field name, or null if the argument isn't extracted from a named field


Copyright © 2012. All Rights Reserved.