public abstract class AbstractEntityProviderModel<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private boolean |
custom |
private java.util.List<javax.ws.rs.core.MediaType> |
declaredTypes |
private java.lang.Class<?> |
providedType |
private T |
provider |
| Constructor and Description |
|---|
AbstractEntityProviderModel(T provider,
java.util.List<javax.ws.rs.core.MediaType> declaredTypes,
boolean custom,
java.lang.Class<T> providerType)
Create new entity provider model.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<javax.ws.rs.core.MediaType> |
declaredTypes()
Get types declared as supported (via
@Produces or @Consumes) on the entity provider. |
private static java.lang.Class<?> |
getProviderClassParam(java.lang.Object provider,
java.lang.Class<?> providerType) |
boolean |
isCustom()
Get the
custom flag value. |
java.lang.Class<?> |
providedType()
Get the provided Java type.
|
T |
provider()
Get the modelled entity provider instance.
|
private final T provider
private final java.util.List<javax.ws.rs.core.MediaType> declaredTypes
private final boolean custom
private final java.lang.Class<?> providedType
AbstractEntityProviderModel(T provider, java.util.List<javax.ws.rs.core.MediaType> declaredTypes, boolean custom, java.lang.Class<T> providerType)
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).public T provider()
public java.util.List<javax.ws.rs.core.MediaType> declaredTypes()
@Produces or @Consumes) on the entity provider.public boolean isCustom()
custom flag value.true if the provider is a custom implementation, false if the provider is
one of the default providers supplied with Jersey.public java.lang.Class<?> providedType()
private static java.lang.Class<?> getProviderClassParam(java.lang.Object provider,
java.lang.Class<?> providerType)