T
- The type of the constantpublic class ConstantActiveDescriptor<T> extends AbstractActiveDescriptor<T>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
For serialization
|
private T |
theOne |
Constructor and Description |
---|
ConstantActiveDescriptor()
For serializable
|
ConstantActiveDescriptor(T theOne,
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,
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,
int rank)
Creates the constant descriptor
|
Modifier and Type | Method and Description |
---|---|
T |
create(ServiceHandle<?> root)
Creates an instance of the ActiveDescriptor.
|
T |
getCache()
This can be used for scopes that will only every be created once.
|
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.lang.reflect.Type |
getImplementationType()
If known the Type of the implementation.
|
boolean |
isCacheSet()
Returns true if this cache has been set
|
addContractType, addQualifierAnnotation, dispose, equals, getContractTypes, getFactoryLocatorId, getFactoryServiceId, getInjectees, getQualifierAnnotations, getScopeAnnotation, getScopeAsAnnotation, hashCode, isReified, releaseCache, removeContractType, removeQualifierAnnotation, setCache, setFactoryId, setImplementationType, setName, setReified, setScopeAnnotation, setScopeAsAnnotation
addAdvertisedContract, addMetadata, addMetadata, addQualifier, clearMetadata, descriptorEquals, getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, 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, writeObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRanking
private static final long serialVersionUID
private final T theOne
public ConstantActiveDescriptor()
public ConstantActiveDescriptor(T theOne, 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, 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, int rank)
theOne
- May not be nulladvertisedContracts
- scope
- name
- qualifiers
- descriptorVisibility
- proxy
- proxyForSameScope
- classAnalysisName
- metadata
- rank
- public java.lang.String getImplementation()
Descriptor
getImplementation
in interface Descriptor
getImplementation
in class DescriptorImpl
public T getCache()
SingleCache
getCache
in interface SingleCache<T>
getCache
in class AbstractActiveDescriptor<T>
public boolean isCacheSet()
SingleCache
isCacheSet
in interface SingleCache<T>
isCacheSet
in class AbstractActiveDescriptor<T>
public java.lang.Class<?> getImplementationClass()
ActiveDescriptor
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
public java.lang.reflect.Type getImplementationType()
ActiveDescriptor
ActiveDescriptor.getImplementationClass()
public T create(ServiceHandle<?> root)
ActiveDescriptor
root
- The root service handle, which can be used
to associated all the PerLookup objects with this creation