T - The cache typepublic class AliasDescriptor<T> extends AbstractActiveDescriptor<T>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALIAS_FREE_DESCRIPTOR
This is the value the metadata field ALIAS_METADATA_MARKER will
take if the descriptor being aliased does not have a locator id
or a service id
|
static java.lang.String |
ALIAS_METADATA_MARKER
This will be put in all Alias descriptors.
|
private java.lang.String |
contract
The contract type of this descriptor.
|
private ActiveDescriptor<T> |
descriptor
The descriptor that this descriptor will alias.
|
private static java.util.Set<java.lang.annotation.Annotation> |
EMPTY_ANNOTATION_SET
Empty set of annotations used to construct this descriptor.
|
private static java.util.Set<java.lang.reflect.Type> |
EMPTY_CONTRACT_SET
Empty set of contracts used to construct this descriptor.
|
private boolean |
initialized
Indicates whether or not this descriptor has been initialized.
|
private ServiceLocator |
locator
The service locator.
|
private java.util.Set<java.lang.String> |
qualifierNames
The set of qualifier names for this descriptor.
|
private java.util.Set<java.lang.annotation.Annotation> |
qualifiers
The set of annotations for this descriptor.
|
private static long |
serialVersionUID
For serialization
|
| Constructor and Description |
|---|
AliasDescriptor()
For serialization
|
AliasDescriptor(ServiceLocator locator,
ActiveDescriptor<T> descriptor,
java.lang.String contract,
java.lang.String name)
Construct an AliasDescriptor.
|
| Modifier and Type | Method and Description |
|---|---|
T |
create(ServiceHandle<?> root)
Creates an instance of the ActiveDescriptor.
|
void |
dispose(T instance)
Disposes this instance.
|
private void |
ensureInitialized()
Ensure that this descriptor has been initialized.
|
boolean |
equals(java.lang.Object o)
This equals matches only if the following fields of the descriptor match:
implementation
contracts
name
scope
qualifiers
descriptorType
descriptorVisibility
metadata
proxiable
proxyForSameScope
analysisName
|
private static java.lang.String |
getAliasMetadataValue(ActiveDescriptor<?> descriptor) |
java.util.Set<java.lang.reflect.Type> |
getContractTypes()
The set of types that this ActiveDescriptor must produce.
|
ActiveDescriptor<T> |
getDescriptor()
Get the descriptor being aliased.
|
java.lang.String |
getImplementation()
Returns the fully qualified class
name of the implementation
class.
|
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.util.Set<java.lang.String> |
getQualifiers()
Returns all of the annotation classes
that this object should be registered
with or looked up by
|
java.lang.Class<? extends java.lang.annotation.Annotation> |
getScopeAnnotation()
Returns the scope that this ActiveDescriptor belongs to
|
int |
hashCode() |
boolean |
isReified()
This method returns true if this descriptor has been reified
(class loaded).
|
addContractType, addQualifierAnnotation, getCache, getFactoryLocatorId, getFactoryServiceId, getScopeAsAnnotation, isCacheSet, releaseCache, removeContractType, removeQualifierAnnotation, setCache, setFactoryId, setName, setReified, setScopeAnnotation, setScopeAsAnnotationaddAdvertisedContract, addMetadata, addMetadata, addQualifier, clearMetadata, descriptorEquals, getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getLoader, getLocatorId, getMetadata, getName, 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, getLoader, getLocatorId, getMetadata, getName, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRankingpublic static final java.lang.String ALIAS_METADATA_MARKER
public static final java.lang.String ALIAS_FREE_DESCRIPTOR
private static final long serialVersionUID
private ServiceLocator locator
private ActiveDescriptor<T> descriptor
private java.lang.String contract
private java.util.Set<java.lang.annotation.Annotation> qualifiers
private java.util.Set<java.lang.String> qualifierNames
private boolean initialized
private static final java.util.Set<java.lang.reflect.Type> EMPTY_CONTRACT_SET
private static final java.util.Set<java.lang.annotation.Annotation> EMPTY_ANNOTATION_SET
public AliasDescriptor()
public AliasDescriptor(ServiceLocator locator, ActiveDescriptor<T> descriptor, java.lang.String contract, java.lang.String name)
locator - the service locatordescriptor - the descriptor to be aliasedcontract - the contactname - the nameprivate static java.lang.String getAliasMetadataValue(ActiveDescriptor<?> descriptor)
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 boolean isReified()
ActiveDescriptorisReified in interface ActiveDescriptor<T>isReified in class AbstractActiveDescriptor<T>public java.lang.String getImplementation()
DescriptorgetImplementation in interface DescriptorgetImplementation in class DescriptorImplpublic java.util.Set<java.lang.reflect.Type> getContractTypes()
ActiveDescriptorgetContractTypes in interface ActiveDescriptor<T>getContractTypes in class AbstractActiveDescriptor<T>public java.lang.Class<? extends java.lang.annotation.Annotation> getScopeAnnotation()
ActiveDescriptorgetScopeAnnotation in interface ActiveDescriptor<T>getScopeAnnotation in class AbstractActiveDescriptor<T>public java.util.Set<java.lang.annotation.Annotation> getQualifierAnnotations()
ActiveDescriptorgetQualifierAnnotations in interface ActiveDescriptor<T>getQualifierAnnotations in class AbstractActiveDescriptor<T>public java.util.Set<java.lang.String> getQualifiers()
DescriptorgetQualifiers in interface DescriptorgetQualifiers in class DescriptorImplpublic 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>public void dispose(T instance)
ActiveDescriptordispose in interface ActiveDescriptor<T>dispose in class AbstractActiveDescriptor<T>instance - The instance to destroypublic ActiveDescriptor<T> getDescriptor()
private void ensureInitialized()
public int hashCode()
hashCode in class AbstractActiveDescriptor<T>public boolean equals(java.lang.Object o)
DescriptorImplequals in class AbstractActiveDescriptor<T>o - The object to compare to this one. May be null (which will result in a false)