xxw1754352621 / java-dev

愿景:提升自我知识容量,扩展自我知识边界
Apache License 2.0
6 stars 2 forks source link

AnnotationAwareOrderComparator.sort 条件顺序排序 #20

Open xxw1754352621 opened 5 years ago

xxw1754352621 commented 5 years ago

说明: AnnotationAwareOrderComparator 用来支持Spring的Ordered类、@Order注解和@Priority注解

@code AnnotationAwareOrderComparator} is an extension of
 * {@link OrderComparator} that supports Spring's
 * {@link org.springframework.core.Ordered} interface as well as the
 * {@link Order @Order} and {@link javax.annotation.Priority @Priority}

最后的排序,采用的JDK7后集合的Timsort排序(大于minRun(32)) 详情:http://ivanfan.site/2017/12/16/Collections.sort()%20%E5%87%BA%E7%8E%B0%20IllegalArgumentException%EF%BC%9F%E5%9B%A0%E4%B8%BA%E5%AE%83%EF%BC%9ATimSort/