Class ContractProvider
java.lang.Object
org.glassfish.jersey.model.ContractProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContract provider model builder. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Class<?> private final Set<Class<? extends Annotation>> static final int"No priority" constant.private final Class<? extends Annotation> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateContractProvider(Class<?> implementationClass, Class<? extends Annotation> scope, Map<Class<?>, Integer> contracts, int defaultPriority, Set<Class<? extends Annotation>> nameBindings) -
Method Summary
Modifier and TypeMethodDescriptionstatic ContractProvider.BuilderCreate new contract provider model builder.static ContractProvider.Builderbuilder(ContractProvider original) Create new contract provider model builder from an existing one.Get the map of contracts and their priorities.Get provided contracts recognized by Jersey.Class<?> Get the implementation class which the contracts belong to.Set<Class<? extends Annotation>> Get the collection of name bindings attached to this component.intgetPriority(Class<?> contract) Get the provider contract priority, if set, default component provider, if not set.Class<? extends Annotation> getScope()Get model component scope.booleanCheck if the component is bound or not.
-
Field Details
-
NO_PRIORITY
public static final int NO_PRIORITY"No priority" constant.- See Also:
-
implementationClass
-
contracts
-
defaultPriority
private final int defaultPriority -
nameBindings
-
scope
-
-
Constructor Details
-
ContractProvider
private ContractProvider(Class<?> implementationClass, Class<? extends Annotation> scope, Map<Class<?>, Integer> contracts, int defaultPriority, Set<Class<? extends Annotation>> nameBindings)
-
-
Method Details
-
builder
Create new contract provider model builder.- Parameters:
implementationClass- class which the contracts belong to.- Returns:
- new contract provider builder.
-
builder
Create new contract provider model builder from an existing one.- Parameters:
original- existing contract provider model.- Returns:
- new contract provider builder.
-
getScope
Description copied from interface:ScopedGet model component scope. -
getImplementationClass
Get the implementation class which the contracts belong to.- Returns:
- implementation class.
-
getContracts
-
getContractMap
-
isNameBound
public boolean isNameBound()Description copied from interface:NameBoundCheck if the component is bound or not.- Specified by:
isNameBoundin interfaceNameBound- Returns:
trueif the component is bound,falseotherwise.
-
getPriority
Get the provider contract priority, if set, default component provider, if not set.- Parameters:
contract- provider contract.- Returns:
- provider priority.
- See Also:
-
getNameBindings
Description copied from interface:NameBoundGet the collection of name bindings attached to this component.- Specified by:
getNameBindingsin interfaceNameBound- Returns:
- collection of name binding annotation types.
-