T - The type from the cachepublic class AutoActiveDescriptor<T> extends AbstractActiveDescriptor<T>
| Modifier and Type | Field and Description |
|---|---|
private Creator<T> |
creator |
private SystemDescriptor<?> |
hk2Parent |
private java.lang.Class<?> |
implClass |
private static long |
serialVersionUID
For serialization
|
| Constructor and Description |
|---|
AutoActiveDescriptor()
For serialization
|
AutoActiveDescriptor(java.lang.Class<?> clazz,
Creator<T> creator,
java.util.Set<java.lang.reflect.Type> advertisedContracts,
java.lang.Class<? extends java.lang.annotation.Annotation> scope,
java.lang.String name,
java.util.Set<java.lang.annotation.Annotation> qualifiers,
DescriptorVisibility descriptorVisibility,
int ranking,
java.lang.Boolean proxy,
java.lang.Boolean proxyForSameScope,
java.lang.String classAnalysisName,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> metadata,
DescriptorType descriptorType)
Constructor with all relevant fields
|
| Modifier and Type | Method and Description |
|---|---|
T |
create(ServiceHandle<?> root)
Creates an instance of the ActiveDescriptor.
|
void |
dispose(T instance)
Disposes this instance.
|
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.
|
(package private) void |
resetSelfDescriptor(ActiveDescriptor<?> toMe) |
(package private) void |
setHK2Parent(SystemDescriptor<?> hk2Parent) |
addContractType, addQualifierAnnotation, equals, getCache, getContractTypes, getFactoryLocatorId, getFactoryServiceId, getQualifierAnnotations, getScopeAnnotation, getScopeAsAnnotation, hashCode, isCacheSet, isReified, releaseCache, removeContractType, removeQualifierAnnotation, setCache, setFactoryId, setName, setReified, setScopeAnnotation, setScopeAsAnnotationaddAdvertisedContract, addMetadata, addMetadata, addQualifier, clearMetadata, descriptorEquals, getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, pretty, readExternal, readObject, removeAdvertisedContract, removeAllMetadata, removeMetadata, removeQualifier, setClassAnalysisName, setDescriptorType, setDescriptorVisibility, setImplementation, setLoader, setLocatorId, setMetadata, setProxiable, setProxyForSameScope, setRanking, setScope, setServiceId, toString, writeExternal, writeObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRankingprivate static final long serialVersionUID
private java.lang.Class<?> implClass
private SystemDescriptor<?> hk2Parent
public AutoActiveDescriptor()
public AutoActiveDescriptor(java.lang.Class<?> clazz,
Creator<T> creator,
java.util.Set<java.lang.reflect.Type> advertisedContracts,
java.lang.Class<? extends java.lang.annotation.Annotation> scope,
java.lang.String name,
java.util.Set<java.lang.annotation.Annotation> qualifiers,
DescriptorVisibility descriptorVisibility,
int ranking,
java.lang.Boolean proxy,
java.lang.Boolean proxyForSameScope,
java.lang.String classAnalysisName,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> metadata,
DescriptorType descriptorType)
clazz - The class of the implementationcreator - The creator to use (factory or clazz)advertisedContracts - The set of advertised contractsscope - The scope of the servicename - The name of the service (may be null)qualifiers - The set of qualifier annotationsdescriptorVisibility - The visibility of this descriptorranking - The initial rankproxy - Whether or not this can be proxied (null for default)proxyForSameScope - Whether or not to proxy within the same scope (null for default)classAnalysisName - The name of the class analyzer (null for default)metadata - The set of metadata associated with this descriptordescriptorType - The type of the descriptorvoid resetSelfDescriptor(ActiveDescriptor<?> toMe)
void setHK2Parent(SystemDescriptor<?> hk2Parent)
public java.lang.Class<?> getImplementationClass()
ActiveDescriptorIf 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
public T create(ServiceHandle<?> root)
ActiveDescriptorroot - The root service handle, which can be used
to associated all the PerLookup objects with this creationpublic void dispose(T instance)
ActiveDescriptordispose in interface ActiveDescriptor<T>dispose in class AbstractActiveDescriptor<T>instance - The instance to destroypublic java.util.List<Injectee> getInjectees()
ActiveDescriptorIf this descriptor is describing a factory created type then this list must have zero length
getInjectees in interface ActiveDescriptor<T>getInjectees in class AbstractActiveDescriptor<T>