8265279: Remove unused RandomGeneratorFactory.all(Class<T> category)
Reviewed-by: rriggs
This commit is contained in:
parent
ee5bba0dc4
commit
770dfc1ec4
@ -370,31 +370,6 @@ public final class RandomGeneratorFactory<T extends RandomGenerator> {
|
|||||||
return factoryOf("L32X64MixRandom", RandomGenerator.class);
|
return factoryOf("L32X64MixRandom", RandomGenerator.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a stream of matching Providers.
|
|
||||||
*
|
|
||||||
* @param category {@link RandomGenerator} sub-interface class to filter
|
|
||||||
* @param <T> {@link RandomGenerator} sub-interface return type
|
|
||||||
*
|
|
||||||
* RandomGenerators that are marked as deprecated or are not properly configured are not included in the result.
|
|
||||||
*
|
|
||||||
* @implSpec Availability is determined by RandomGeneratorFactory using the service provider API
|
|
||||||
* to locate implementations of the RandomGenerator interface.
|
|
||||||
*
|
|
||||||
* @return Stream of matching {@link RandomGeneratorFactory RandomGeneratorFactory(s)}.
|
|
||||||
*
|
|
||||||
* @hidden
|
|
||||||
*/
|
|
||||||
public static <T extends RandomGenerator> Stream<RandomGeneratorFactory<T>> all(Class<T> category) {
|
|
||||||
Map<String, Provider<? extends RandomGenerator>> fm = getFactoryMap();
|
|
||||||
return fm.values()
|
|
||||||
.stream()
|
|
||||||
.filter(p -> isSubclass(category, p) &&
|
|
||||||
!p.type().isAnnotationPresent(Deprecated.class) &&
|
|
||||||
p.type().isAnnotationPresent(RandomGeneratorProperties.class))
|
|
||||||
.map(RandomGeneratorFactory::new);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a non-empty stream of available {@link RandomGeneratorFactory RandomGeneratorFactory(s)}.
|
* Returns a non-empty stream of available {@link RandomGeneratorFactory RandomGeneratorFactory(s)}.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user