public class FactoryDescriptorsImpl extends Object implements FactoryDescriptors
Factory| Constructor and Description |
|---|
FactoryDescriptorsImpl(Descriptor asService,
Descriptor asProvideMethod)
This creates a descriptor pair describing a
Factory
and the associated Factory.provide() method |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Descriptor |
getFactoryAsAFactory()
This returns the factory as a factory for some other type.
|
Descriptor |
getFactoryAsAService()
This returns the factory as a service itself.
|
int |
hashCode() |
String |
toString() |
public FactoryDescriptorsImpl(Descriptor asService, Descriptor asProvideMethod)
Factory
and the associated Factory.provide() methodasService - A description of the factory itself as an hk2 service.
May not be null. Must have DescriptorType of DescriptorType.CLASS. One
of the contracts must be FactoryasProvideMethod - A description of the provide method of the factory. Must have
DescriptorType of DescriptorType.PROVIDE_METHOD.
May not be nullIllegalArgumentException - if the descriptors are not of the proper typepublic Descriptor getFactoryAsAService()
FactoryDescriptorsFactory. The descriptor type must be DescriptorType.CLASS
since this descriptor is describing the factory itself.getFactoryAsAService in interface FactoryDescriptorspublic Descriptor getFactoryAsAFactory()
FactoryDescriptorsDescriptorType.PROVIDE_METHOD since this descriptor is
describing the factory as a factory, not as a service.getFactoryAsAFactory in interface FactoryDescriptorsCopyright © 2009–2019 Oracle Corporation. All rights reserved.