Class OperationDescriptor<T extends java.lang.annotation.Annotation>
- java.lang.Object
-
- org.glassfish.hk2.utilities.DescriptorImpl
-
- org.glassfish.hk2.utilities.AbstractActiveDescriptor<OperationHandle<T>>
-
- org.glassfish.hk2.extras.operation.internal.OperationDescriptor<T>
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,ActiveDescriptor<OperationHandle<T>>
,Descriptor
,SingleCache<OperationHandle<T>>
public class OperationDescriptor<T extends java.lang.annotation.Annotation> extends AbstractActiveDescriptor<OperationHandle<T>>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private SingleOperationManager<T>
parent
-
Constructor Summary
Constructors Constructor Description OperationDescriptor(T scope, SingleOperationManager<T> parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationHandle<T>
create(ServiceHandle<?> root)
Creates an instance of the ActiveDescriptor.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.void
setImplementationType(java.lang.reflect.Type t)
-
Methods inherited from class org.glassfish.hk2.utilities.AbstractActiveDescriptor
addContractType, addQualifierAnnotation, dispose, equals, getCache, getContractTypes, getFactoryLocatorId, getFactoryServiceId, getInjectees, getQualifierAnnotations, getScopeAnnotation, getScopeAsAnnotation, hashCode, isCacheSet, isReified, releaseCache, removeContractType, removeQualifierAnnotation, setCache, setFactoryId, setName, setReified, setScopeAnnotation, setScopeAsAnnotation
-
Methods inherited from class org.glassfish.hk2.utilities.DescriptorImpl
addAdvertisedContract, 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, 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, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRanking
-
-
-
-
Field Detail
-
parent
private final SingleOperationManager<T extends java.lang.annotation.Annotation> parent
-
-
Constructor Detail
-
OperationDescriptor
public OperationDescriptor(T scope, SingleOperationManager<T> parent)
-
-
Method Detail
-
getImplementationClass
public java.lang.Class<?> getImplementationClass()
Description copied from interface:ActiveDescriptor
The implementation class that should be used to generate new instances of this descriptor.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
- Returns:
- The class that directly implements the contract types, or the class that is the factory for an object that implements the contract types
-
getImplementationType
public java.lang.reflect.Type getImplementationType()
Description copied from interface:ActiveDescriptor
If known the Type of the implementation. If unknown will return the same asActiveDescriptor.getImplementationClass()
- Returns:
- The type of the implementation or the implementation class
-
setImplementationType
public void setImplementationType(java.lang.reflect.Type t)
- Overrides:
setImplementationType
in classAbstractActiveDescriptor<OperationHandle<T extends java.lang.annotation.Annotation>>
-
create
public OperationHandle<T> create(ServiceHandle<?> root)
Description copied from interface:ActiveDescriptor
Creates an instance of the ActiveDescriptor. All of the Injectee's must be created prior to instantiation, and associated with the ExtendedProvider so that they can be destroyed properly- Parameters:
root
- The root service handle, which can be used to associated all the PerLookup objects with this creation- Returns:
- An instance of this ActiveDescriptor
-
-