public static void addLTSBean(Object bean) { Class<?> clazz = bean.getClass(); Method[] methods = clazz.getMethods(); if (methods != null && methods.length > 0) { for (final Method method : methods) { if (method.isAnnotationPresent(JobRunnerItem.class)) { JobRunnerItem jobRunnerItem = method.getAnnotation(JobRunnerItem.class); String shardValue = jobRunnerItem.shardValue(); if (StringUtils.isEmpty(shardValue)) { LOGGER.error(clazz.getName() + ":" + method.getName() + " " + JobRunnerItem.class.getName() + " shardValue can not be null"); continue; } JobRunnerHolder.add(shardValue, JobRunnerBuilder.build(bean, method, method.getParameterTypes())); } } } } }
public static void addLTSBean(Object bean) { Class<?> clazz = bean.getClass(); Method[] methods = clazz.getMethods(); if (methods != null && methods.length > 0) { for (final Method method : methods) { if (method.isAnnotationPresent(JobRunnerItem.class)) { JobRunnerItem jobRunnerItem = method.getAnnotation(JobRunnerItem.class); String shardValue = jobRunnerItem.shardValue(); if (StringUtils.isEmpty(shardValue)) { LOGGER.error(clazz.getName() + ":" + method.getName() + " " + JobRunnerItem.class.getName() + " shardValue can not be null"); continue; } JobRunnerHolder.add(shardValue, JobRunnerBuilder.build(bean, method, method.getParameterTypes())); } } } } }
public static void addLTSBean(Object bean) { Class<?> clazz = bean.getClass(); Method[] methods = clazz.getMethods(); if (methods != null && methods.length > 0) { for (final Method method : methods) { if (method.isAnnotationPresent(JobRunnerItem.class)) { JobRunnerItem jobRunnerItem = method.getAnnotation(JobRunnerItem.class); String shardValue = jobRunnerItem.shardValue(); if (StringUtils.isEmpty(shardValue)) { LOGGER.error(clazz.getName() + ":" + method.getName() + " " + JobRunnerItem.class.getName() + " shardValue can not be null"); continue; } JobRunnerHolder.add(shardValue, JobRunnerBuilder.build(bean, method, method.getParameterTypes())); } } } } }