CrazyHZM commented on code in PR #13307: URL: https://github.com/apache/dubbo/pull/13307#discussion_r1396608367
########## dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/generate/ReflectConfigMetadataRepository.java: ########## @@ -78,6 +78,24 @@ private TypeDescriber buildTypeDescriberWithConstructor(Class<?> c) { return new TypeDescriber(c.getName(), null, new HashSet<>(), constructors, new HashSet<>(), memberCategories); } + protected ReflectConfigMetadataRepository registerFieldType(List<Class<?>> classes) { + types.addAll(classes.stream() + .filter(Objects::nonNull) + .map(this::buildTypeDescriberWithField) + .collect(Collectors.toList())); + return this; + } + + private TypeDescriber buildTypeDescriberWithField(Class<?> c) { + Set<ExecutableDescriber> constructors = Arrays.stream(c.getConstructors()) + .map((constructor) -> new ExecutableDescriber(constructor, INVOKE)) + .collect(Collectors.toSet()); + Set<MemberCategory> memberCategories = new HashSet<>(); + memberCategories.add(MemberCategory.INVOKE_PUBLIC_METHODS); Review Comment: This type does not need to contain public method. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org