public class ActiveDescriptorBuilderImpl extends Object implements ActiveDescriptorBuilder
| Constructor and Description |
|---|
ActiveDescriptorBuilderImpl(Class<?> implementation)
constructor with the impl class
|
| Modifier and Type | Method and Description |
|---|---|
ActiveDescriptorBuilder |
analyzeWith(String serviceName)
Call this if the descriptor should be analyzed with the
ClassAnalyzer service of the given name |
ActiveDescriptorBuilder |
andLoadWith(HK2Loader loader)
Call this if this descriptor should be loaded with the given HK2Loader
|
ActiveDescriptorBuilder |
asType(Type t)
Call this if the parameterized type of the implementation
class is known.
|
<T> AbstractActiveDescriptor<T> |
build()
Generates a descriptor that can be used in binding operations
|
<T> AbstractActiveDescriptor<T> |
buildFactory()
Deprecated.
|
<T> AbstractActiveDescriptor<T> |
buildProvideMethod()
Generates a descriptor that can be used in binding operations that
describes a factorys provide method
|
ActiveDescriptorBuilder |
has(String key,
List<String> values)
An instance of data to be associated with this descriptor
|
ActiveDescriptorBuilder |
has(String key,
String value)
An instance of data to be associated with this descriptor
|
ActiveDescriptorBuilder |
in(Annotation scopeAnnotation)
A scope to be associated with this descriptor object.
|
ActiveDescriptorBuilder |
in(Class<? extends Annotation> scope)
A scope to be associated with this descriptor object.
|
ActiveDescriptorBuilder |
localOnly()
This will cause the descriptorVisibility field of the returned
descriptor to return LOCAL
|
ActiveDescriptorBuilder |
named(String name)
The name for this descriptor object.
|
ActiveDescriptorBuilder |
ofRank(int rank)
The rank to be associated with this descriptor.
|
ActiveDescriptorBuilder |
proxy()
This will cause the isProxiable field of the returned
descriptor to return true (it will force this
descriptor to use proxies).
|
ActiveDescriptorBuilder |
proxy(boolean forceProxy)
This will cause the isProxiable field of the returned
descriptor to return the given value.
|
ActiveDescriptorBuilder |
proxyForSameScope()
This will cause the isProxyForSameScope field of the returned
descriptor to return true (it will force this
descriptor to use proxies even when injecting into
the same scope).
|
ActiveDescriptorBuilder |
proxyForSameScope(boolean forceProxyForSameScope)
This will cause the isProxyForSameScope field of the returned
descriptor to return the given value.
|
ActiveDescriptorBuilder |
qualifiedBy(Annotation annotation)
A qualifier to be associated with this descriptor object
|
ActiveDescriptorBuilder |
to(Type contract)
A contract to be associated with this descriptor object.
|
ActiveDescriptorBuilder |
visibility(DescriptorVisibility visibility)
This will set the descriptorVisibility field of the returned
descriptor
|
public ActiveDescriptorBuilderImpl(Class<?> implementation)
implementation - The implementation class (may be null)public ActiveDescriptorBuilder named(String name) throws IllegalArgumentException
ActiveDescriptorBuildernamed in interface ActiveDescriptorBuildername - The name to be associated with this DescriptorIllegalArgumentException - if there is more than one name on the predicatepublic ActiveDescriptorBuilder to(Type contract) throws IllegalArgumentException
ActiveDescriptorBuilderto in interface ActiveDescriptorBuildercontract - A class that is annotated with Contract to
be associated with this DescriptorIllegalArgumentException - on failurespublic ActiveDescriptorBuilder in(Annotation scopeAnnotation) throws IllegalArgumentException
ActiveDescriptorBuilderin in interface ActiveDescriptorBuilderscopeAnnotation - The class of the scope this descriptor is to have.IllegalArgumentException - If in is called more than oncepublic ActiveDescriptorBuilder in(Class<? extends Annotation> scope) throws IllegalArgumentException
ActiveDescriptorBuilderin in interface ActiveDescriptorBuilderscope - The class of the scope this descriptor is to have.IllegalArgumentException - If in is called more than oncepublic ActiveDescriptorBuilder qualifiedBy(Annotation annotation) throws IllegalArgumentException
ActiveDescriptorBuilderqualifiedBy in interface ActiveDescriptorBuilderannotation - The annotation to be associated with this descriptorIllegalArgumentException - on failurespublic ActiveDescriptorBuilder has(String key, String value) throws IllegalArgumentException
ActiveDescriptorBuilderhas in interface ActiveDescriptorBuilderkey - The key for the data to be associated with this descriptorvalue - The value this key should take (single value metadata)IllegalArgumentExceptionpublic ActiveDescriptorBuilder has(String key, List<String> values) throws IllegalArgumentException
ActiveDescriptorBuilderhas in interface ActiveDescriptorBuilderkey - The key for the data to be associated with this descriptorvalues - The values this key should take (single value metadata)IllegalArgumentExceptionpublic ActiveDescriptorBuilder ofRank(int rank)
ActiveDescriptorBuilderofRank in interface ActiveDescriptorBuilderrank - The rank to be associated with this descriptor.public ActiveDescriptorBuilder proxy()
ActiveDescriptorBuilderproxy in interface ActiveDescriptorBuilderpublic ActiveDescriptorBuilder proxy(boolean forceProxy)
ActiveDescriptorBuilderproxy in interface ActiveDescriptorBuilderforceProxy - if true then this descriptor will be proxied,
if false then this descriptor will NOT be proxiedpublic ActiveDescriptorBuilder proxyForSameScope()
ActiveDescriptorBuilderproxyForSameScope in interface ActiveDescriptorBuilderpublic ActiveDescriptorBuilder proxyForSameScope(boolean forceProxyForSameScope)
ActiveDescriptorBuilderproxyForSameScope in interface ActiveDescriptorBuilderforceProxyForSameScope - if true then this descriptor will be
proxied even if the scope of the injectee is the same,
if false then this descriptor will NOT be proxied, even if the
scope of the injectee is the samepublic ActiveDescriptorBuilder andLoadWith(HK2Loader loader) throws IllegalArgumentException
ActiveDescriptorBuilderandLoadWith in interface ActiveDescriptorBuilderloader - The loader to use with this descriptorIllegalArgumentException - if the HK2Loader is set non-null more than oncepublic ActiveDescriptorBuilder analyzeWith(String serviceName)
ActiveDescriptorBuilderClassAnalyzer service of the given nameanalyzeWith in interface ActiveDescriptorBuilderserviceName - the name of the ClassAnalyzer service
that should be used to analyze this servicepublic ActiveDescriptorBuilder localOnly()
ActiveDescriptorBuilderlocalOnly in interface ActiveDescriptorBuilderpublic ActiveDescriptorBuilder visibility(DescriptorVisibility visibility)
ActiveDescriptorBuildervisibility in interface ActiveDescriptorBuildervisibility - The non-null visibility that this descriptor should takepublic ActiveDescriptorBuilder asType(Type t)
ActiveDescriptorBuilderasType in interface ActiveDescriptorBuildert - The non-null ParameterizedType describing the implementationpublic <T> AbstractActiveDescriptor<T> build() throws IllegalArgumentException
ActiveDescriptorBuilderbuild in interface ActiveDescriptorBuilderIllegalArgumentException - if the built descriptor is invalid@Deprecated public <T> AbstractActiveDescriptor<T> buildFactory() throws IllegalArgumentException
ActiveDescriptorBuilderbuildFactory in interface ActiveDescriptorBuilderIllegalArgumentException - if the built descriptor is invalidpublic <T> AbstractActiveDescriptor<T> buildProvideMethod() throws IllegalArgumentException
ActiveDescriptorBuilderbuildProvideMethod in interface ActiveDescriptorBuilderIllegalArgumentException - if the built descriptor is invalidCopyright © 2009–2019 Oracle Corporation. All rights reserved.