private static Builder<?> createBuilder(final Class<?> clazz) throws InvocationTargetException, IllegalAccessException { for (final Method method : clazz.getDeclaredMethods()) { if (method.isAnnotationPresent(PluginBuilderFactory.class) && Modifier.isStatic(method.getModifiers()) && TypeUtil.isAssignable(Builder.class, method.getReturnType())) { ReflectionUtil.makeAccessible(method); return (Builder<?>) method.invoke(null); } } return null; }
@PluginBuilderFactory public static Builder newBuilder() { return new Builder(); }
/** * Log4j2 builder creator */ @PluginBuilderFactory public static RocketmqLog4j2Appender.Builder newBuilder() { return new RocketmqLog4j2Appender.Builder(); }
@PluginBuilderFactory public static <B extends Builder<B>> B newBuilder() { return new Builder<B>().asBuilder(); }
@PluginBuilderFactory public static RollingIndexNameFormatter.Builder newBuilder() { return new RollingIndexNameFormatter.Builder(); }
@PluginBuilderFactory public static IndexTemplate.Builder newBuilder() { return new IndexTemplate.Builder(); }
@PluginBuilderFactory public static NoopIndexNameFormatter.Builder newBuilder() { return new NoopIndexNameFormatter.Builder(); }
@PluginBuilderFactory public static <B extends Builder<B>> B newPoolingDriverConnectionSourceBuilder() { return new Builder<B>().asBuilder(); }
/** * Creates a builder for a KafkaAppender. * @return a builder for a KafkaAppender. */ @PluginBuilderFactory public static <B extends Builder<B>> B newBuilder() { return new Builder<B>().asBuilder(); }
@PluginBuilderFactory public static SocketPerformancePreferences newBuilder() { return new SocketPerformancePreferences(); }
@PluginBuilderFactory public static SocketOptions newBuilder() { return new SocketOptions(); }
/** * @return a builder for a HttpAppender. */ @PluginBuilderFactory public static <B extends Builder<B>> B newBuilder() { return new Builder<B>().asBuilder(); }
@PluginBuilderFactory public static <B extends Builder<B>> B newSyslogAppenderBuilder() { return new Builder<B>().asBuilder(); }
@PluginBuilderFactory public static TimeBasedTriggeringPolicy.Builder newBuilder() { return new Builder(); }