Top Description Inners Methods
org.springframework.context.annotation

public Interface ConfigurationCondition

extends Condition

A Condition that offers more fine-grained control when used with @Configuration. Allows certain conditions to adapt when they match based on the configuration phase. For example, a condition that checks if a bean has already been registered might choose to only be evaluated during the REGISTER_BEAN ConfigurationPhase.
Author
Phillip Webb
Since
4.0
See Also
Configuration

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
ConfigurationCondition.ConfigurationPhase

The various configuration phases where the condition could be evaluated.

Method Summary

Modifier and TypeMethod and Description
public ConfigurationCondition.ConfigurationPhase
getConfigurationPhase()

Return the ConfigurationPhase in which the condition should be evaluated.

Inherited from org.springframework.context.annotation.Condition:
matches

Method Detail

getConfigurationPhaseback to summary
public ConfigurationCondition.ConfigurationPhase getConfigurationPhase()

Return the ConfigurationPhase in which the condition should be evaluated.

org.springframework.context.annotation back to summary

public final Enum ConfigurationCondition.ConfigurationPhase

extends Enum<ConfigurationCondition.ConfigurationPhase>
Class Inheritance

The various configuration phases where the condition could be evaluated.

Field Summary

Modifier and TypeField and Description
public static final ConfigurationCondition.ConfigurationPhase
PARSE_CONFIGURATION

The Condition should be evaluated as a @Configuration class is being parsed.

public static final ConfigurationCondition.ConfigurationPhase
REGISTER_BEAN

The Condition should be evaluated when adding a regular (non @Configuration) bean.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ConfigurationCondition.ConfigurationPhase
public static ConfigurationCondition.ConfigurationPhase[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PARSE_CONFIGURATIONback to summary
public static final ConfigurationCondition.ConfigurationPhase PARSE_CONFIGURATION

The Condition should be evaluated as a @Configuration class is being parsed.

If the condition does not match at this point, the @Configuration class will not be added.

REGISTER_BEANback to summary
public static final ConfigurationCondition.ConfigurationPhase REGISTER_BEAN

The Condition should be evaluated when adding a regular (non @Configuration) bean. The condition will not prevent @Configuration classes from being added.

At the time that the condition is evaluated, all @Configuration classes will have been parsed.

Constructor Detail

ConfigurationPhaseback to summary
private ConfigurationPhase()

Method Detail

valueOfback to summary
public static ConfigurationCondition.ConfigurationPhase valueOf(String name)
valuesback to summary
public static ConfigurationCondition.ConfigurationPhase[] values()