Spring Framework AnnotationAwareOrderComparator - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AnnotationAwareOrderComparator class.

This code example shows how to use the following methods:
 
	private List<S> unordered = new ArrayList<S>();
 
	private List<S> ordered = new ArrayList<S>();
	 
	private Comparator<? super S> comparator = new AnnotationAwareOrderComparator();
 
	private List<S> list = new ArrayList<S>();
 
	/** 
	 * Public setter for the listeners. 
	 *  
	 * @param items 
	 */ 
	public void setItems(List<? extends S> items) {
		unordered.clear();
		ordered.clear();
		for (S s : items) {
			add(s);
		} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
	/** 
	 * Comparator regarding {@link org.springframework.core.Ordered} interface or 
	 * {@link org.springframework.core.annotation.Order} annotation. 
	 */ 
	private static final Comparator<Object> DEFAULT_COMPARATOR = new AnnotationAwareOrderComparator();
 
	/** 
	 * Comparator reverting the {@value #DEFAULT_COMPARATOR}. 
	 */ 
	private static final Comparator<Object> DEFAULT_REVERSE_COMPARATOR = new InvertibleComparator<Object>(
			DEFAULT_COMPARATOR, false);
 
	private Comparator<? super T> comparator;
 
	/** 
	 * Creates a new {@link OrderAwarePluginRegistry} with the given {@link Plugin}s and {@link Comparator}. 
	 *  
	 * @param plugins the {@link Plugin}s to be contained in the registry or {@literal null} if the registry shall be 
	 *          empty initally. 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
	private List<S> unordered = new ArrayList<S>();
 
	private List<S> ordered = new ArrayList<S>();
 
	private Comparator<? super S> comparator = new AnnotationAwareOrderComparator();
 
	private List<S> list = new ArrayList<S>();
 
	/** 
	 * Public setter for the listeners. 
	 * 
	 * @param items the new items 
	 */ 
	public void setItems(List<? extends S> items) {
		unordered.clear();
		ordered.clear();
		for (S s : items) {
			add(s);
		} 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	 
	public static<T> List<T> orderedBeansIncludingAncestors(
			ListableBeanFactory lbf, Class<T> type) {
		 
		ArrayList<T> beans = new ArrayList<T>(listBeansOfTypeIncludingAncestors(lbf, type));
		Collections.sort(beans, new AnnotationAwareOrderComparator());
		return beans;
	} 
	 
	public static<T> List<T> orderedBeans(ListableBeanFactory lbf, Class<T> type) {
		ArrayList<T> beans = new ArrayList<T>(listBeansOfType(lbf, type));
		Collections.sort(beans, new AnnotationAwareOrderComparator());
		return beans;
	} 
	 
	public static WebApplicationContext getWebsiteApplicationContext(
			ServletContext servletContext, String servletName) {
		 
		Assert.notNull(servletName, "A servleName must be specified");
		String contextAttribute = DispatcherServlet.SERVLET_CONTEXT_PREFIX 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
	private List<S> unordered = new ArrayList<S>();
 
	private List<S> ordered = new ArrayList<S>();
 
	private Comparator<? super S> comparator = new AnnotationAwareOrderComparator();
 
	private List<S> list = new ArrayList<S>();
 
	/** 
	 * Public setter for the listeners. 
	 * 
	 * @param items items 
	 */ 
	public void setItems(List<? extends S> items) {
		unordered.clear();
		ordered.clear();
		for (S s : items) {
			add(s);
		} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 *  
 * @author Oliver Gierke 
 */ 
public class BeanListFactoryBean<T> extends AbstractTypeAwareSupport<T> implements FactoryBean<List<T>> {
 
	private static final Comparator<Object> COMPARATOR = new AnnotationAwareOrderComparator();
 
	/* 
	 * (non-Javadoc) 
	 * @see org.springframework.beans.factory.FactoryBean#getObject() 
	 */ 
	public List<T> getObject() {
 
		List<T> beans = new ArrayList<T>();
		beans.addAll(getBeans());
		Collections.sort(beans, COMPARATOR);
 
		return beans;
	} 
 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
            getObjectFinders().addAll(objectFinders);
            updateObjectFinders(); 
        } 
 
        if (null != convertInterceptors) {
            Collections.sort(convertInterceptors, new AnnotationAwareOrderComparator());
            getConvertInterceptors().addAll(convertInterceptors);
            updateConvertInterceptors(); 
        } 
 
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: