java.lang.Object
org.glassfish.hk2.utilities.DescriptorImpl
org.glassfish.hk2.utilities.AbstractActiveDescriptor<Optional<T>>
org.jvnet.hk2.internal.OptionalActiveDescriptor<T>
- All Implemented Interfaces:
Externalizable,Serializable,org.glassfish.hk2.api.ActiveDescriptor<Optional<T>>,org.glassfish.hk2.api.Descriptor,org.glassfish.hk2.api.SingleCache<Optional<T>>
public class OptionalActiveDescriptor<T>
extends org.glassfish.hk2.utilities.AbstractActiveDescriptor<Optional<T>>
Descriptor for
Optional to allow for injection of a service if it exists or else Optional.EMPTY. It will also allow for injection of an Optional directly as well.- Author:
- jonathan coustick
- See Also:
-
Constructor Summary
Constructors -
Method Summary
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, setImplementationType, setName, setReified, setScopeAnnotation, setScopeAsAnnotationMethods 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, writeObjectMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glassfish.hk2.api.Descriptor
getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRanking
-
Constructor Details
-
OptionalActiveDescriptor
public OptionalActiveDescriptor()For serialization
-
-
Method Details
-
getImplementationClass
-
getImplementationType
-
create
-