private String getDescription(ClassMeta classMeta) { String description = ""; AnnotationData annotationData = classMeta.annotation("Description"); if (annotationData == null) { return ""; } final Map<String, Object> descriptionMap = annotationData.getValues(); if (descriptionMap != null) { if (descriptionMap.containsKey("value")) { description = descriptionMap.get("value").toString(); } } return description; }
private <T> Map<String, String> createMethodToChannelMap(final String channelPrefix, final Class<T> eventBusProxyInterface) { final Map<String, String> methodToChannelMap = new ConcurrentHashMap<>(20); final ClassMeta<T> classMeta = classMeta(eventBusProxyInterface); final AnnotationData classAnnotation = classMeta.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); final String classEventBusName = AnnotationUtils.getClassEventChannelName(classMeta, classAnnotation); classMeta.methods().forEach(methodAccess -> { AnnotationData methodAnnotation = methodAccess.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); String methodEventBusName = methodAnnotation != null && methodAnnotation.getValues().get("value") != null ? methodAnnotation.getValues().get("value").toString() : null; if (Str.isEmpty(methodEventBusName)) { methodEventBusName = methodAccess.name(); } final String channelName = createChannelName(channelPrefix, classEventBusName, methodEventBusName); methodToChannelMap.put(methodAccess.method().toString(), channelName); }); return methodToChannelMap; }
interfaceMeta.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME);
.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); if (eventChannelAnnotation == null) { continue;
private <T> Map<String, String> createMethodToChannelMap(final String channelPrefix, final Class<T> eventBusProxyInterface) { final Map<String, String> methodToChannelMap = new ConcurrentHashMap<>(20); final ClassMeta<T> classMeta = classMeta(eventBusProxyInterface); final AnnotationData classAnnotation = classMeta.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); final String classEventBusName = AnnotationUtils.getClassEventChannelName(classMeta, classAnnotation); classMeta.methods().forEach(methodAccess -> { AnnotationData methodAnnotation = methodAccess.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); String methodEventBusName = methodAnnotation != null && methodAnnotation.getValues().get("value") != null ? methodAnnotation.getValues().get("value").toString() : null; if (Str.isEmpty(methodEventBusName)) { methodEventBusName = methodAccess.name(); } final String channelName = createChannelName(channelPrefix, classEventBusName, methodEventBusName); methodToChannelMap.put(methodAccess.method().toString(), channelName); }); return methodToChannelMap; }
private <T> Map<String, String> createMethodToChannelMap(final String channelPrefix, final Class<T> eventBusProxyInterface) { final Map<String, String> methodToChannelMap = new ConcurrentHashMap<>(20); final ClassMeta<T> classMeta = classMeta(eventBusProxyInterface); final AnnotationData classAnnotation = classMeta.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); final String classEventBusName = AnnotationUtils.getClassEventChannelName(classMeta, classAnnotation); classMeta.methods().forEach(methodAccess -> { AnnotationData methodAnnotation = methodAccess.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); String methodEventBusName = methodAnnotation != null && methodAnnotation.getValues().get("value") != null ? methodAnnotation.getValues().get("value").toString() : null; if (Str.isEmpty(methodEventBusName)) { methodEventBusName = methodAccess.name(); } final String channelName = createChannelName(channelPrefix, classEventBusName, methodEventBusName); methodToChannelMap.put(methodAccess.method().toString(), channelName); }); return methodToChannelMap; }
.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); if (eventChannelAnnotation == null) { continue;
.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME); if (eventChannelAnnotation == null) { continue;
interfaceMeta.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME);
interfaceMeta.annotation(AnnotationUtils.EVENT_CHANNEL_ANNOTATION_NAME);