T
- This is the type produced by the cache and consumed by the cachepublic interface ActiveDescriptor<T> extends Descriptor, SingleCache<T>
ServiceLocator
.reifyDescriptor method.
ActiveDescriptors may also be provided to the system pre-reified, which is useful when the Service described may be produced by a third-party system. In this case the ActiveDescriptors create method must use the third-party system in order to create instances of the described service
Modifier and Type | Method and Description |
---|---|
T |
create(ServiceHandle<?> root)
Creates an instance of the ActiveDescriptor.
|
void |
dispose(T instance)
Disposes this instance.
|
java.util.Set<java.lang.reflect.Type> |
getContractTypes()
The set of types that this ActiveDescriptor must produce.
|
java.lang.Long |
getFactoryLocatorId()
If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then
this field will return the ServiceId of its associated Factory
service.
|
java.lang.Long |
getFactoryServiceId()
If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then
this field will return the ServiceId of its associated Factory
service.
|
java.lang.Class<?> |
getImplementationClass()
The implementation class that should be used
to generate new instances of this descriptor.
|
java.util.List<Injectee> |
getInjectees()
Returns the full list of Injectees this class has.
|
java.util.Set<java.lang.annotation.Annotation> |
getQualifierAnnotations()
The full set of qualifiers that this ActiveDescriptor
provides
|
java.lang.Class<? extends java.lang.annotation.Annotation> |
getScopeAnnotation()
Returns the scope that this ActiveDescriptor belongs to
|
java.lang.annotation.Annotation |
getScopeAsAnnotation()
Returns the scope as an
Annotation
implementation that this ActiveDescriptor belongs to |
boolean |
isReified()
This method returns true if this descriptor has been reified
(class loaded).
|
getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRanking
getCache, isCacheSet, releaseCache, setCache
boolean isReified()
java.lang.Class<?> getImplementationClass()
If the class returned is a Factory, then the factory is used to create instances. In this case the system will get an instance of the factory and use it to create the instances
java.util.Set<java.lang.reflect.Type> getContractTypes()
java.lang.annotation.Annotation getScopeAsAnnotation()
Annotation
implementation that this ActiveDescriptor belongs toAnnotation
java.lang.Class<? extends java.lang.annotation.Annotation> getScopeAnnotation()
java.util.Set<java.lang.annotation.Annotation> getQualifierAnnotations()
java.util.List<Injectee> getInjectees()
If this descriptor is describing a factory created type then this list must have zero length
java.lang.Long getFactoryServiceId()
java.lang.Long getFactoryLocatorId()
T create(ServiceHandle<?> root)
root
- The root service handle, which can be used
to associated all the PerLookup objects with this creationvoid dispose(T instance)
instance
- The instance to destroy