001/*
002 * Copyright 2002-2019 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.core;
018
019/**
020 * Extension of the {@link Ordered} interface, expressing a <em>priority</em>
021 * ordering: {@code PriorityOrdered} objects are always applied before
022 * <em>plain</em> {@link Ordered} objects regardless of their order values.
023 *
024 * <p>When sorting a set of {@code Ordered} objects, {@code PriorityOrdered}
025 * objects and <em>plain</em> {@code Ordered} objects are effectively treated as
026 * two separate subsets, with the set of {@code PriorityOrdered} objects preceding
027 * the set of <em>plain</em> {@code Ordered} objects and with relative
028 * ordering applied within those subsets.
029 *
030 * <p>This is primarily a special-purpose interface, used within the framework
031 * itself for objects where it is particularly important to recognize
032 * <em>prioritized</em> objects first, potentially without even obtaining the
033 * remaining objects. A typical example: prioritized post-processors in a Spring
034 * {@link org.springframework.context.ApplicationContext}.
035 *
036 * <p>Note: {@code PriorityOrdered} post-processor beans are initialized in
037 * a special phase, ahead of other post-processor beans. This subtly
038 * affects their autowiring behavior: they will only be autowired against
039 * beans which do not require eager initialization for type matching.
040 *
041 * @author Juergen Hoeller
042 * @author Sam Brannen
043 * @since 2.5
044 * @see org.springframework.beans.factory.config.PropertyOverrideConfigurer
045 * @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
046 */
047public interface PriorityOrdered extends Ordered {
048}