It is often the case when using a classpath that the same jar file can appear on the path more than once. For example this is often done when patching. However, if this jar contains HK2 descriptor files in it, that can mean duplicate services that are not intended to be duplicated. This service removes all duplicate descriptors from the set to be added to HK2
| Modifier and Type | Class and Description |
|---|---|
| private static class | DuplicatePostProcessor.
Key use for implementation only (along with descriptor type, otherwise factories eliminate themselves) |
| Modifier and Type | Field and Description |
|---|---|
| private final HashSet | |
| private final DuplicatePostProcessorMode | |
| private final HashSet |
| Access | Constructor and Description |
|---|---|
| public | DuplicatePostProcessor()
Creates a DuplicatePostProcessor with the STRICT mode for determining duplicates |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public DuplicatePostProcessorMode | |
| private DescriptorImpl | |
| public DescriptorImpl | process(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl)
Implements org. This method can be used to alter the descriptor read in. It can also add descriptors, or remove the descriptor (by returning null). |
| private DescriptorImpl | |
| public String |
| implOnlyDupSet | back to summary |
|---|---|
| private final HashSet<DuplicatePostProcessor. | |
| mode | back to summary |
|---|---|
| private final DuplicatePostProcessorMode mode | |
| strictDupSet | back to summary |
|---|---|
| private final HashSet<DescriptorImpl> strictDupSet | |
| DuplicatePostProcessor | back to summary |
|---|---|
| public DuplicatePostProcessor() Creates a DuplicatePostProcessor with the STRICT mode for determining duplicates | |
| DuplicatePostProcessor | back to summary |
|---|---|
| public DuplicatePostProcessor(DuplicatePostProcessorMode mode) Creates a DuplicatePostProcessor with the | |
| getMode | back to summary |
|---|---|
| public DuplicatePostProcessorMode getMode() Returns the mode of this DuplicatePostProcessorMode of this processor
| |
| implementationOnly | back to summary |
|---|---|
| private DescriptorImpl implementationOnly(ServiceLocator serviceLocator, final DescriptorImpl descriptorImpl) | |
| process | back to summary |
|---|---|
| public DescriptorImpl process(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl) Implements org. Doc from org. This method can be used to alter the descriptor read in. It can also add descriptors, or remove the descriptor (by returning null). Any alterations made to the descriptor passed in will remain in effect.
| |
| strict | back to summary |
|---|---|
| private DescriptorImpl strict(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String | |
| private final DescriptorType |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public String |
| hash | back to summary |
|---|---|
| private final int hash | |
| impl | back to summary |
|---|---|
| private final String impl | |
| type | back to summary |
|---|---|
| private final DescriptorType type | |
| ImplOnlyKey | back to summary |
|---|---|
| private ImplOnlyKey(Descriptor desc) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |