public final class WriterModel extends AbstractEntityProviderModel<javax.ws.rs.ext.MessageBodyWriter>
MessageBodyWriter model.| Constructor and Description | 
|---|
| WriterModel(javax.ws.rs.ext.MessageBodyWriter provider,
           List<javax.ws.rs.core.MediaType> types,
           Boolean custom)Create new writer model instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | isWriteable(Class<?> type,
           Type genericType,
           Annotation[] annotations,
           javax.ws.rs.core.MediaType mediaType)Safely invokes  isWriteablemethod on the underlying provider. | 
declaredTypes, isCustom, providedType, providerpublic WriterModel(javax.ws.rs.ext.MessageBodyWriter provider,
                   List<javax.ws.rs.core.MediaType> types,
                   Boolean custom)
provider - modelled message body writer instance.types - supported media types as declared in @Consumes annotation attached to the provider class.custom - custom flag.public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable method on the underlying provider.
 Any exceptions will be logged at finer level.type - the class of instance that is to be written.genericType - the type of instance to be written, obtained either
                    by reflection of a resource method return type or via inspection
                    of the returned instance. GenericEntity
                    provides a way to specify this information at runtime.annotations - an array of the annotations attached to the message entity instance.mediaType - the media type of the HTTP entity.true if the type is supported, otherwise false.Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.