public final class ReaderModel extends AbstractEntityProviderModel<javax.ws.rs.ext.MessageBodyReader>
MessageBodyReader model.| Constructor and Description | 
|---|
ReaderModel(javax.ws.rs.ext.MessageBodyReader provider,
           List<javax.ws.rs.core.MediaType> types,
           Boolean custom)
Create new reader model instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
isReadable(Class<?> type,
          Type genericType,
          Annotation[] annotations,
          javax.ws.rs.core.MediaType mediaType)
Safely invokes  
isReadable method on the underlying provider. | 
declaredTypes, isCustom, providedType, providerpublic ReaderModel(javax.ws.rs.ext.MessageBodyReader provider,
                   List<javax.ws.rs.core.MediaType> types,
                   Boolean custom)
provider - modelled message body reader instance.types - supported media types as declared in @Consumes annotation attached to the provider class.custom - custom flag.public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable method on the underlying provider.
 Any exceptions will be logged at finer level.type - the class of instance to be produced.genericType - the type of instance to be produced. E.g. if the
                    message body is to be converted into a method parameter, this will be
                    the formal type of the method parameter as returned by
                    Method.getGenericParameterTypes.annotations - an array of the annotations on the declaration of the
                    artifact that will be initialized with the produced instance. E.g. if the
                    message body is to be converted into a method parameter, this will be
                    the annotations on that parameter returned by
                    Method.getParameterAnnotations.mediaType - the media type of the HTTP entity, if one is not
                    specified in the request then application/octet-stream is
                    used.true if the type is supported, otherwise false.Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.