org.jvnet.hk2.internal
Class ConstantActiveDescriptor<T>
java.lang.Object
org.glassfish.hk2.utilities.DescriptorImpl
org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
org.jvnet.hk2.internal.ConstantActiveDescriptor<T>
- Type Parameters:
T - The type of the constant
- All Implemented Interfaces:
- java.io.Serializable, ActiveDescriptor<T>, Descriptor, SingleCache<T>
public class ConstantActiveDescriptor<T>
- extends AbstractActiveDescriptor<T>
- Author:
- jwells
- See Also:
- Serialized Form
|
Constructor Summary |
ConstantActiveDescriptor(T theOne,
long locatorId)
Creates a constant active descriptor with the given locator ID |
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 visibility,
int ranking,
java.lang.Boolean proxy,
java.lang.String analyzerName,
long locatorId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> metadata)
Constructor with more control over the fields of the descriptor |
| Methods inherited from class org.glassfish.hk2.utilities.AbstractActiveDescriptor |
addContractType, addQualifierAnnotation, getContractTypes, getFactoryLocatorId, getFactoryServiceId, getInjectees, getQualifierAnnotations, getScopeAnnotation, isReified, releaseCache, removeContractType, removeQualifierAnnotation, setCache, setFactoryId, setName, setReified |
| Methods inherited from class org.glassfish.hk2.utilities.DescriptorImpl |
addAdvertisedContract, addMetadata, addQualifier, clearMetadata, equals, getAdvertisedContracts, getBaseDescriptor, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getLoader, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, hashCode, isProxiable, pretty, readObject, removeAdvertisedContract, removeAllMetadata, removeMetadata, removeQualifier, setBaseDescriptor, setClassAnalysisName, setDescriptorType, setDescriptorVisibility, setImplementation, setLoader, setLocatorId, setMetadata, setProxiable, setRanking, setScope, setServiceId, toString, writeObject |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.glassfish.hk2.api.Descriptor |
getAdvertisedContracts, getBaseDescriptor, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getLoader, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, setRanking |
ConstantActiveDescriptor
public ConstantActiveDescriptor(T theOne,
long locatorId)
- Creates a constant active descriptor with the given locator ID
- Parameters:
theOne - the object to create it fromlocatorId - The id of the locator this is being created for
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 visibility,
int ranking,
java.lang.Boolean proxy,
java.lang.String analyzerName,
long locatorId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> metadata)
- Constructor with more control over the fields of the descriptor
- Parameters:
theOne - advertisedContracts - scope - name - qualifiers - ranking - locatorId -
getImplementation
public java.lang.String getImplementation()
- Specified by:
getImplementation in interface Descriptor- Overrides:
getImplementation in class DescriptorImpl
getLocatorId
public java.lang.Long getLocatorId()
- Specified by:
getLocatorId in interface Descriptor- Overrides:
getLocatorId in class DescriptorImpl
getCache
public T getCache()
- Specified by:
getCache in interface SingleCache<T>- Overrides:
getCache in class AbstractActiveDescriptor<T>
isCacheSet
public boolean isCacheSet()
- Specified by:
isCacheSet in interface SingleCache<T>- Overrides:
isCacheSet in class AbstractActiveDescriptor<T>
getImplementationClass
public java.lang.Class<?> getImplementationClass()
create
public T create(ServiceHandle<?> root)
dispose
public void dispose(T instance)
- Specified by:
dispose in interface ActiveDescriptor<T>- Overrides:
dispose in class AbstractActiveDescriptor<T>
Copyright © 2013 Oracle Corporation. All Rights Reserved.