ServiceLocator.reifyDescriptor method.
ActiveDescriptors may also be provided to the system pre-reified, which is useful when the Service described may be produced by a third-party system. In this case the ActiveDescriptors create method must use the third-party system in order to create instances of the described service
| Modifier and Type | Method and Description |
|---|---|
| public T | Returns: An instance of this ActiveDescriptorThe root service handle, which can be used
to associated all the PerLookup objects with this creation root)Creates an instance of the ActiveDescriptor. |
| public void | |
| public Set | Returns: the set of types this ActiveDescriptor must implement or extendThe set of types that this ActiveDescriptor must produce. |
| public Long | Returns: The locator ID of the associated factory serviceIf this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. |
| public Long | Returns: The service ID of the associated factory serviceIf this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. |
| public Class | Returns: The class that directly implements the contract types, or the class that is the factory for an object that implements the contract typesThe implementation class that should be used to generate new instances of this descriptor. |
| public Type | Returns: The type of the implementation or the implementation classIf known the Type of the implementation. |
| public List | Returns: Will not return null, but may return an empty list. The set of Injectees that must be resolved before this ActiveDescriptor can be constructedReturns the full list of Injectees this class has. |
| public Set | Returns: The set of annotations that this ActiveDescriptor providesThe full set of qualifiers that this ActiveDescriptor provides |
| public Class | Returns: The scope of this ActiveDescriptorReturns the scope that this ActiveDescriptor belongs to |
| public Annotation | Returns: The scope of this ActiveDescriptor as anAnnotationReturns the scope as an |
| public boolean | Returns: true if this descriptor has been reified, false otherwiseThis method returns true if this descriptor has been reified (class loaded). |
| create | back to summary |
|---|---|
| public T create(ServiceHandle<?> root) 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
| |
| dispose | back to summary |
|---|---|
| public void dispose(T instance) Disposes this instance. All the PerLookup objects that were created for this instance will be destroyed after this object has been destroyed
| |
| getContractTypes | back to summary |
|---|---|
| public Set The set of types that this ActiveDescriptor must produce. These types may be Classes or ParameterizedTypes, and may be no other subclass of Type | |
| getFactoryLocatorId | back to summary |
|---|---|
| public Long getFactoryLocatorId() If 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
| |
| getFactoryServiceId | back to summary |
|---|---|
| public Long getFactoryServiceId() If 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
| |
| getImplementationClass | back to summary |
|---|---|
| public Class 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
| |
| getImplementationType | back to summary |
|---|---|
| public Type getImplementationType() If known the Type of the implementation. If unknown will
return the same as
| |
| getInjectees | back to summary |
|---|---|
| public List Returns 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 | |
| getQualifierAnnotations | back to summary |
|---|---|
| public Set The full set of qualifiers that this ActiveDescriptor provides
| |
| getScopeAnnotation | back to summary |
|---|---|
| public Class Returns the scope that this ActiveDescriptor belongs to
| |
| getScopeAsAnnotation | back to summary |
|---|---|
| public Annotation getScopeAsAnnotation() Returns the scope as an
| |
| isReified | back to summary |
|---|---|
| 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
| |