Skip to content

[Dubbo-Optimization]: polish ClassUtils#6003

Merged
chickenlj merged 1 commit intoapache:masterfrom
tangcent:chore/polish-ClassUtils
Apr 24, 2020
Merged

[Dubbo-Optimization]: polish ClassUtils#6003
chickenlj merged 1 commit intoapache:masterfrom
tangcent:chore/polish-ClassUtils

Conversation

@tangcent
Copy link
Copy Markdown
Contributor

@tangcent tangcent commented Apr 12, 2020

What is the purpose of the change

 public static Set<Class<?>> getAllInterfaces(Class<?> type, Predicate<Class<?>>... interfaceFilters) {

        System.out.println("getAllInterfaces of " + (type == null ? "null" : type.getName()));
        if (type == null || type.isPrimitive()) {
            return emptySet();
        }
       ...
    }

Run test case https://github.com/apache/dubbo/blob/master/dubbo-common/src/test/java/org/apache/dubbo/convert/multiple/StringToBlockingDequeConverterTest.java

Output:

getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of java.util.concurrent.BlockingDeque
getAllInterfaces of java.util.concurrent.BlockingQueue
getAllInterfaces of java.util.Queue
getAllInterfaces of java.util.Collection
getAllInterfaces of java.lang.Iterable
getAllInterfaces of java.util.Deque
getAllInterfaces of java.util.Queue
getAllInterfaces of java.util.Collection
getAllInterfaces of java.lang.Iterable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
  • Add the log in PR branch like this:
    public static Set<Class<?>> getAllInterfaces(Class<?> type, Predicate<Class<?>>... interfaceFilters) {
        ...

        while (clazz != null) {

            System.out.println("getAllInterfaces of " + clazz.getName());
            ...
        }
        ...

Output:

getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of java.util.concurrent.BlockingDeque
getAllInterfaces of java.util.concurrent.BlockingQueue
getAllInterfaces of java.util.Deque
getAllInterfaces of java.util.Queue
getAllInterfaces of java.util.Collection
getAllInterfaces of java.lang.Iterable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.StringToIntegerConverter
getAllInterfaces of org.apache.dubbo.common.convert.StringConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.Converter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToBlockingDequeConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToIterableConverter
getAllInterfaces of java.lang.Object
getAllInterfaces of org.apache.dubbo.common.convert.multiple.StringToMultiValueConverter
getAllInterfaces of org.apache.dubbo.common.convert.multiple.MultiValueConverter
getAllInterfaces of org.apache.dubbo.common.lang.Prioritized
getAllInterfaces of java.lang.Comparable
getAllInterfaces of java.lang.Object
  • The log output is reduced from 432 lines to 198 lines.

  • Fell free to close it if it has be included in other PRs or It is not expected to change.

Brief changelog

  • use loop instead of recursion in getAllInterfaces/getAllSuperClasses.

Verifying this change

Run test cases.

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@tangcent tangcent changed the title polish ClassUtils [Dubbo-Optimization]: polish ClassUtils Apr 12, 2020
@tangcent tangcent force-pushed the chore/polish-ClassUtils branch from 0b32e57 to de0740a Compare April 12, 2020 13:18
@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 12, 2020

Codecov Report

Merging #6003 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6003   +/-   ##
=========================================
  Coverage     61.21%   61.21%           
  Complexity      495      495           
=========================================
  Files           989      989           
  Lines         39300    39300           
  Branches       5649     5649           
=========================================
  Hits          24059    24059           
  Misses        12597    12597           
  Partials       2644     2644           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 317e62f...ef600fd. Read the comment docs.

- use loop instead of recursion
@tangcent tangcent force-pushed the chore/polish-ClassUtils branch from de0740a to ef600fd Compare April 13, 2020 00:21
@chickenlj chickenlj merged commit e71ad15 into apache:master Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants