Package org.glassfish.jersey.message
Class AbstractEntityProviderModel<T>
java.lang.Object
org.glassfish.jersey.message.AbstractEntityProviderModel<T>
- Direct Known Subclasses:
ReaderModel
,WriterModel
Abstract entity provider model.
- Since:
- 2.16
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractEntityProviderModel
(T provider, List<javax.ws.rs.core.MediaType> declaredTypes, boolean custom, Class<T> providerType) Create new entity provider model. -
Method Summary
Modifier and TypeMethodDescriptionList
<javax.ws.rs.core.MediaType> Get types declared as supported (via@Produces
or@Consumes
) on the entity provider.private static Class
<?> getProviderClassParam
(Object provider, Class<?> providerType) boolean
isCustom()
Get thecustom
flag value.Class
<?> Get the provided Java type.provider()
Get the modelled entity provider instance.
-
Field Details
-
provider
-
declaredTypes
-
custom
private final boolean custom -
providedType
-
-
Constructor Details
-
AbstractEntityProviderModel
AbstractEntityProviderModel(T provider, List<javax.ws.rs.core.MediaType> declaredTypes, boolean custom, Class<T> providerType) Create new entity provider model. NOTE: The constructor is package private on purpose as we do not support extensions of this class from another package.- Parameters:
provider
- entity provider instance.declaredTypes
- declared supported media types.custom
- custom flag;true
is the provider is custom,false
if the provider is one of the default Jersey providers.providerType
- parameterized entity provider type (used to retrieve the provided Java type).
-
-
Method Details
-
provider
Get the modelled entity provider instance.- Returns:
- entity provider instance.
-
declaredTypes
Get types declared as supported (via@Produces
or@Consumes
) on the entity provider.- Returns:
- declared supported types.
-
isCustom
public boolean isCustom()Get thecustom
flag value.- Returns:
true
if the provider is a custom implementation,false
if the provider is one of the default providers supplied with Jersey.
-
providedType
Get the provided Java type.- Returns:
- provided Java type.
-
getProviderClassParam
-