public interface Descriptor
ActiveDescriptor
. For example, a
Descriptor can know that a service has a qualifier named Foo, but
will not know (without the use of Metadata
) what values
Foo contains.
Services have a number of optional attributes such as name and scope. A service is required to minimally have a type name representing the concrete (i.e., byType) definition.
Metadata
Modifier and Type | Method and Description |
---|---|
Set<String> |
getAdvertisedContracts()
Returns the base class name of the contracts that
this service describes.
|
String |
getClassAnalysisName()
Returns the name of the
ClassAnalyzer service that
should be used to discover the constructors, initialization methods,
field and postConstruct and preDestory methods. |
DescriptorType |
getDescriptorType()
Returns CLASS if this is a class descriptor
and FACTORY if this is a descriptor describing
a factory for a type, in which case the
implClass should point to the implementation
class of the factory
|
DescriptorVisibility |
getDescriptorVisibility()
Returns the visibility of this descriptor.
|
String |
getImplementation()
Returns the fully qualified class
name of the implementation
class.
|
HK2Loader |
getLoader()
This returns the loader that should be used when
classloading this descriptor.
|
Long |
getLocatorId()
This returns the id of the ServiceLocator which this descriptor
is registered with.
|
Map<String,List<String>> |
getMetadata()
Returns all of the metadata associated
that this object should be registered
with or looked up by
|
String |
getName()
The name of this descriptor.
|
Set<String> |
getQualifiers()
Returns all of the annotation classes
that this object should be registered
with or looked up by
|
int |
getRanking()
Returns the ranking of this descriptor.
|
String |
getScope()
Returns the fully qualified class name of
the scope annotation that should be
associated with this descriptor.
|
Long |
getServiceId()
This returns the unique identifier for this descriptor.
|
Boolean |
isProxiable()
If this returns true then the system will create a proxy for
instances of this descriptor.
|
Boolean |
isProxyForSameScope()
This value determines whether or not this service should be
proxied when being injected into other services of the same
scope.
|
int |
setRanking(int ranking)
Returns the ranking of this descriptor.
|
String getImplementation()
Set<String> getAdvertisedContracts()
String getScope()
String getName()
Set<String> getQualifiers()
DescriptorType getDescriptorType()
DescriptorVisibility getDescriptorVisibility()
If the visibility is NORMAL then this descriptor may be seen by all children locators of the locator in which this descriptor is bound
If the visibility is LOCAL then this descriptor may only be seen by the servcie locator in which it is bound, and in none of the children of that locator
Map<String,List<String>> getMetadata()
HK2Loader getLoader()
int getRanking()
int setRanking(int ranking)
The ranking of a service may change at any time during the life of the descriptor
ranking
- The new ranking this descriptor should haveBoolean isProxiable()
ProxyCtl
interface
It is an error for this method to return true if the scope that
this descriptor is in is Unproxiable
(such as PerLookup).
Proxiable
)Boolean isProxyForSameScope()
String getClassAnalysisName()
ClassAnalyzer
service that
should be used to discover the constructors, initialization methods,
field and postConstruct and preDestory methods. If null the default
implementation will be used. Will be ignored for descriptors that
are not automatically analyzed by hk2Long getServiceId()
Long getLocatorId()
Copyright © 2009–2019 Oracle Corporation. All rights reserved.