|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glassfish.hk2.utilities.DescriptorImpl
org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
org.glassfish.hk2.internal.ConstantActiveDescriptor<T>
T
- The type of the constantpublic class ConstantActiveDescriptor<T>
Constructor Summary | |
---|---|
ConstantActiveDescriptor()
For serializable |
|
ConstantActiveDescriptor(T theOne,
Set<Type> advertisedContracts,
Class<? extends Annotation> scope,
String name,
Set<Annotation> qualifiers,
Map<String,List<String>> metadata)
Creates the constant descriptor |
Method Summary | |
---|---|
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. |
String |
getImplementation()
Returns the fully qualified class name of the implementation class. |
Class<?> |
getImplementationClass()
The implementation class that should be used to generate new instances of this descriptor. |
boolean |
isCacheSet()
Returns true if this cache has been set |
Methods inherited from class org.glassfish.hk2.utilities.AbstractActiveDescriptor |
---|
addContractType, addQualifierAnnotation, dispose, getContractTypes, getFactoryLocatorId, getFactoryServiceId, getInjectees, getQualifierAnnotations, getScopeAnnotation, isReified, releaseCache, removeContractType, removeQualifierAnnotation, setCache, setFactoryId, setReified |
Methods inherited from class org.glassfish.hk2.utilities.DescriptorImpl |
---|
addAdvertisedContract, addMetadata, addQualifier, equals, getAdvertisedContracts, getBaseDescriptor, getDescriptorType, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, hashCode, pretty, readObject, removeAdvertisedContract, removeAllMetadata, removeMetadata, removeQualifier, setBaseDescriptor, setDescriptorType, setImplementation, setLoader, setLocatorId, setName, 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, getDescriptorType, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, setRanking |
Constructor Detail |
---|
public ConstantActiveDescriptor()
public ConstantActiveDescriptor(T theOne, Set<Type> advertisedContracts, Class<? extends Annotation> scope, String name, Set<Annotation> qualifiers, Map<String,List<String>> metadata)
theOne
- May not be nulladvertisedContracts
- scope
- name
- qualifiers
- Method Detail |
---|
public 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 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 T create(ServiceHandle<?> root)
ActiveDescriptor
root
- The root service handle, which can be used
to associated all the PerLookup objects with this creation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |