/** * Creates a new {@link PolicySpec} instance with the given config, for a policy of the given type. * * This is primarily for groovy code; equivalent to {@code PolicySpec.create(type).configure(config)}. * * @param config The spec's configuration (see {@link PolicySpec#configure(Map)}). * @param type A {@link Policy} class */ public static <T extends Policy> PolicySpec<T> create(Map<?,?> config, Class<T> type) { return PolicySpec.create(type).configure(config); }