Class Binding<T,D extends Binding>
- java.lang.Object
-
- org.glassfish.jersey.internal.inject.Binding<T,D>
-
- Type Parameters:
T- type of the bean described by this injection binding.D- concrete injection binding implementation type.
- Direct Known Subclasses:
ClassBinding,InjectionResolverBinding,InstanceBinding,SupplierClassBinding,SupplierInstanceBinding
public abstract class Binding<T,D extends Binding> extends Object
Abstract injection binding description of a bean.- Author:
- Petr Bouda
-
-
Constructor Summary
Constructors Constructor Description Binding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AliasBindingaddAlias(Class<?> contract)Adds service's alias.DanalyzeWith(String analyzer)Adds service's analyzer.Set<AliasBinding>getAliases()Gets service's aliases.StringgetAnalyzer()Gets service's analyzer.Set<Type>getContracts()Gets service's contracts.Class<T>getImplementationType()Gets service's type.StringgetName()Gets service's name.Set<Annotation>getQualifiers()Gets service's qualifiers.IntegergetRank()Gets rank of the service.Class<? extends Annotation>getScope()Gets service's scope.Din(Class<? extends Annotation> scopeAnnotation)Adds service's scope.BooleanisProxiable()Gets information whether the service is proxiable.BooleanisProxiedForSameScope()Gets information whether the service creates the proxy for the same scope.Dnamed(String name)Adds service's name.Dproxy(boolean proxiable)Adds information about proxy creation.DproxyForSameScope(boolean proxyForSameScope)Adds information about proxy creation when the service is in the same scope.DqualifiedBy(Annotation annotation)Adds service's qualifier.voidranked(int rank)Adds service's rank.Dto(GenericType<?> contract)Adds service's contract.Dto(Class<? super T> contract)Adds service's contract.Dto(Type contract)Adds service's contract.Dto(Collection<Class<? super T>> contracts)Adds service's contracts.
-
-
-
Method Detail
-
isProxiable
public Boolean isProxiable()
Gets information whether the service is proxiable.- Returns:
trueif the service is proxiable.
-
isProxiedForSameScope
public Boolean isProxiedForSameScope()
Gets information whether the service creates the proxy for the same scope.- Returns:
trueif the service creates the proxy for the same scop.
-
getRank
public Integer getRank()
Gets rank of the service.- Returns:
- service's rank.
-
getContracts
public Set<Type> getContracts()
Gets service's contracts.- Returns:
- service's contracts.
-
getQualifiers
public Set<Annotation> getQualifiers()
Gets service's qualifiers.- Returns:
- service's qualifiers.
-
getScope
public Class<? extends Annotation> getScope()
Gets service's scope.- Returns:
- service's scope.
-
getName
public String getName()
Gets service's name.- Returns:
- service's name.
-
getImplementationType
public Class<T> getImplementationType()
Gets service's type.- Returns:
- service's type.
-
getAnalyzer
public String getAnalyzer()
Gets service's analyzer.- Returns:
- service's analyzer.
-
getAliases
public Set<AliasBinding> getAliases()
Gets service's aliases.- Returns:
- service's aliases.
-
analyzeWith
public D analyzeWith(String analyzer)
Adds service's analyzer.- Returns:
- current instance.
-
to
public D to(Collection<Class<? super T>> contracts)
Adds service's contracts.- Returns:
- current instance.
-
to
public D to(GenericType<?> contract)
Adds service's contract.- Returns:
- current instance.
-
qualifiedBy
public D qualifiedBy(Annotation annotation)
Adds service's qualifier.- Returns:
- current instance.
-
in
public D in(Class<? extends Annotation> scopeAnnotation)
Adds service's scope.- Returns:
- current instance.
-
addAlias
public AliasBinding addAlias(Class<?> contract)
Adds service's alias.- Parameters:
contract- contract of the alias.- Returns:
- instance of a new alias for this binding descriptor that can be further specified.
-
proxy
public D proxy(boolean proxiable)
Adds information about proxy creation.- Returns:
- current instance.
-
proxyForSameScope
public D proxyForSameScope(boolean proxyForSameScope)
Adds information about proxy creation when the service is in the same scope.- Returns:
- current instance.
-
ranked
public void ranked(int rank)
Adds service's rank.
-
-