()
| 64 | private final Set<Augmentation<?>> augmentations; |
| 65 | |
| 66 | public Augmenter() { |
| 67 | Set<Augmentation<?>> augmentations = new HashSet<>(); |
| 68 | StreamSupport.stream(ServiceLoader.load(AugmenterProvider.class).spliterator(), false) |
| 69 | .forEach(provider -> augmentations.add(createAugmentation(provider))); |
| 70 | |
| 71 | this.augmentations = unmodifiableSet(augmentations); |
| 72 | } |
| 73 | |
| 74 | private static <X> Augmentation<X> createAugmentation(AugmenterProvider<X> provider) { |
| 75 | Require.nonNull("Interface provider", provider); |