Package org.glassfish.hk2.internal
Class ActiveDescriptorBuilderImpl.BuiltActiveDescriptor<T>
java.lang.Object
org.glassfish.hk2.utilities.DescriptorImpl
org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
org.glassfish.hk2.internal.ActiveDescriptorBuilderImpl.BuiltActiveDescriptor<T>
- All Implemented Interfaces:
Externalizable
,Serializable
,ActiveDescriptor<T>
,Descriptor
,SingleCache<T>
- Enclosing class:
ActiveDescriptorBuilderImpl
private static class ActiveDescriptorBuilderImpl.BuiltActiveDescriptor<T>
extends AbstractActiveDescriptor<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionFor serializationprivate
BuiltActiveDescriptor
(Class<?> implementationClass, Set<Type> advertisedContracts, Annotation scopeAnnotation, Class<? extends Annotation> scope, String name, Set<Annotation> qualifiers, DescriptorType descriptorType, DescriptorVisibility descriptorVisibility, int ranking, Boolean proxy, Boolean proxyForSameScope, String classAnalysisName, Map<String, List<String>> metadata, HK2Loader loader, Type implementationType) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ServiceHandle<?> root) Creates an instance of the ActiveDescriptor.Class
<?> The implementation class that should be used to generate new instances of this descriptor.If known the Type of the implementation.void
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 Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization- See Also:
-
implementationClass
-
implementationType
-
-
Constructor Details
-
BuiltActiveDescriptor
public BuiltActiveDescriptor()For serialization -
BuiltActiveDescriptor
private BuiltActiveDescriptor(Class<?> implementationClass, Set<Type> advertisedContracts, Annotation scopeAnnotation, Class<? extends Annotation> scope, String name, Set<Annotation> qualifiers, DescriptorType descriptorType, DescriptorVisibility descriptorVisibility, int ranking, Boolean proxy, Boolean proxyForSameScope, String classAnalysisName, Map<String, List<String>> metadata, HK2Loader loader, Type implementationType)
-
-
Method Details
-
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
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
-
create
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
-
setImplementationType
- Overrides:
setImplementationType
in classAbstractActiveDescriptor<T>
-