Class AutoActiveDescriptor<T>

java.lang.Object
org.glassfish.hk2.utilities.DescriptorImpl
org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
org.jvnet.hk2.internal.AutoActiveDescriptor<T>
Type Parameters:
T - The type from the cache
All Implemented Interfaces:
Externalizable, Serializable, org.glassfish.hk2.api.ActiveDescriptor<T>, org.glassfish.hk2.api.Descriptor, org.glassfish.hk2.api.SingleCache<T>

public class AutoActiveDescriptor<T> extends org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
Author:
jwells
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    For serialization
    AutoActiveDescriptor(Class<?> clazz, Creator<T> creator, Set<Type> advertisedContracts, Class<? extends Annotation> scope, String name, Set<Annotation> qualifiers, org.glassfish.hk2.api.DescriptorVisibility descriptorVisibility, int ranking, Boolean proxy, Boolean proxyForSameScope, String classAnalysisName, Map<String,List<String>> metadata, org.glassfish.hk2.api.DescriptorType descriptorType, Type clazzType)
    Constructor with all relevant fields
  • Method Summary

    Modifier and Type
    Method
    Description
    create(org.glassfish.hk2.api.ServiceHandle<?> root)
     
    void
    dispose(T instance)
     
     
     
    List<org.glassfish.hk2.api.Injectee>
     
    void
     

    Methods inherited from class org.glassfish.hk2.utilities.AbstractActiveDescriptor

    addContractType, addQualifierAnnotation, equals, getCache, getContractTypes, getFactoryLocatorId, getFactoryServiceId, 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
  • Constructor Details

    • AutoActiveDescriptor

      public AutoActiveDescriptor()
      For serialization
    • AutoActiveDescriptor

      public AutoActiveDescriptor(Class<?> clazz, Creator<T> creator, Set<Type> advertisedContracts, Class<? extends Annotation> scope, String name, Set<Annotation> qualifiers, org.glassfish.hk2.api.DescriptorVisibility descriptorVisibility, int ranking, Boolean proxy, Boolean proxyForSameScope, String classAnalysisName, Map<String,List<String>> metadata, org.glassfish.hk2.api.DescriptorType descriptorType, Type clazzType)
      Constructor with all relevant fields
      Parameters:
      clazz - The class of the implementation
      creator - The creator to use (factory or clazz)
      advertisedContracts - The set of advertised contracts
      scope - The scope of the service
      name - The name of the service (may be null)
      qualifiers - The set of qualifier annotations
      descriptorVisibility - The visibility of this descriptor
      ranking - The initial rank
      proxy - Whether or not this can be proxied (null for default)
      proxyForSameScope - Whether or not to proxy within the same scope (null for default)
      classAnalysisName - The name of the class analyzer (null for default)
      metadata - The set of metadata associated with this descriptor
      descriptorType - The type of the descriptor
  • Method Details

    • getImplementationClass

      public Class<?> getImplementationClass()
    • getImplementationType

      public Type getImplementationType()
    • setImplementationType

      public void setImplementationType(Type t)
      Overrides:
      setImplementationType in class org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
    • create

      public T create(org.glassfish.hk2.api.ServiceHandle<?> root)
    • dispose

      public void dispose(T instance)
      Specified by:
      dispose in interface org.glassfish.hk2.api.ActiveDescriptor<T>
      Overrides:
      dispose in class org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
    • getInjectees

      public List<org.glassfish.hk2.api.Injectee> getInjectees()
      Specified by:
      getInjectees in interface org.glassfish.hk2.api.ActiveDescriptor<T>
      Overrides:
      getInjectees in class org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>