Class CrossOverDescriptor<T>
java.lang.Object
org.glassfish.hk2.utilities.DescriptorImpl
org.glassfish.hk2.utilities.AbstractActiveDescriptor<T>
org.glassfish.hk2.extras.hk2bridge.internal.CrossOverDescriptor<T>
- All Implemented Interfaces:
Externalizable, Serializable, ActiveDescriptor<T>, Descriptor, SingleCache<T>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ActiveDescriptor<T> private final ServiceLocatorprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcreate(ServiceHandle<?> root) Creates an instance of the ActiveDescriptor.voidDisposes this instance.The set of types that this ActiveDescriptor must produce.If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service.If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service.Class<?> The implementation class that should be used to generate new instances of this descriptor.If known the Type of the implementation.Returns the full list of Injectees this class has.The full set of qualifiers that this ActiveDescriptor providesClass<? extends Annotation> Returns the scope that this ActiveDescriptor belongs toReturns the scope as anAnnotationimplementation that this ActiveDescriptor belongs tobooleanThis method returns true if this descriptor has been reified (class loaded).voidMethods inherited from class AbstractActiveDescriptor
addContractType, addQualifierAnnotation, equals, getCache, hashCode, isCacheSet, releaseCache, removeContractType, removeQualifierAnnotation, setCache, setFactoryId, setName, setReified, setScopeAnnotation, setScopeAsAnnotationMethods inherited from class 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 interface Descriptor
getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRanking
-
Field Details
-
remoteLocator
-
remote
-
remoteReified
private boolean remoteReified
-
-
Constructor Details
-
CrossOverDescriptor
-
-
Method Details
-
isReified
public boolean isReified()This method returns true if this descriptor has been reified (class loaded). If this method returns false then the other methods in this interface will throw an IllegalStateException. Once this method returns true it may be- Specified by:
isReifiedin interfaceActiveDescriptor<T>- Overrides:
isReifiedin classAbstractActiveDescriptor<T>- Returns:
- true if this descriptor has been reified, false otherwise
-
checkState
private void checkState() -
getImplementationClass
Description copied from interface:ActiveDescriptorThe 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:ActiveDescriptorIf 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
- Overrides:
setImplementationTypein classAbstractActiveDescriptor<T>
-
getContractTypes
Description copied from interface:ActiveDescriptorThe set of types that this ActiveDescriptor must produce. These types may be Classes or ParameterizedTypes, and may be no other subclass of Type- Specified by:
getContractTypesin interfaceActiveDescriptor<T>- Overrides:
getContractTypesin classAbstractActiveDescriptor<T>- Returns:
- the set of types this ActiveDescriptor must implement or extend
-
getScopeAsAnnotation
Description copied from interface:ActiveDescriptorReturns the scope as anAnnotationimplementation that this ActiveDescriptor belongs to- Specified by:
getScopeAsAnnotationin interfaceActiveDescriptor<T>- Overrides:
getScopeAsAnnotationin classAbstractActiveDescriptor<T>- Returns:
- The scope of this ActiveDescriptor as an
Annotation
-
getScopeAnnotation
Description copied from interface:ActiveDescriptorReturns the scope that this ActiveDescriptor belongs to- Specified by:
getScopeAnnotationin interfaceActiveDescriptor<T>- Overrides:
getScopeAnnotationin classAbstractActiveDescriptor<T>- Returns:
- The scope of this ActiveDescriptor
-
getQualifierAnnotations
Description copied from interface:ActiveDescriptorThe full set of qualifiers that this ActiveDescriptor provides- Specified by:
getQualifierAnnotationsin interfaceActiveDescriptor<T>- Overrides:
getQualifierAnnotationsin classAbstractActiveDescriptor<T>- Returns:
- The set of annotations that this ActiveDescriptor provides
-
getInjectees
Description copied from interface:ActiveDescriptorReturns the full list of Injectees this class has. These references will be resolved prior to the class being constructed, even if these injectees are field or method injectees.If this descriptor is describing a factory created type then this list must have zero length
- Specified by:
getInjecteesin interfaceActiveDescriptor<T>- Overrides:
getInjecteesin classAbstractActiveDescriptor<T>- Returns:
- Will not return null, but may return an empty list. The set of Injectees that must be resolved before this ActiveDescriptor can be constructed
-
getFactoryServiceId
Description copied from interface:ActiveDescriptorIf this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. Otherwise this method should return null- Specified by:
getFactoryServiceIdin interfaceActiveDescriptor<T>- Overrides:
getFactoryServiceIdin classAbstractActiveDescriptor<T>- Returns:
- The service ID of the associated factory service
-
getFactoryLocatorId
Description copied from interface:ActiveDescriptorIf this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. Otherwise this method should return null- Specified by:
getFactoryLocatorIdin interfaceActiveDescriptor<T>- Overrides:
getFactoryLocatorIdin classAbstractActiveDescriptor<T>- Returns:
- The locator ID of the associated factory service
-
create
Description copied from interface:ActiveDescriptorCreates 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
-
dispose
Description copied from interface:ActiveDescriptorDisposes this instance. All the PerLookup objects that were created for this instance will be destroyed after this object has been destroyed- Specified by:
disposein interfaceActiveDescriptor<T>- Overrides:
disposein classAbstractActiveDescriptor<T>- Parameters:
instance- The instance to destroy
-