类 MutuallyExclusiveConfigurationPropertiesException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cn.taketoday.context.properties.source.MutuallyExclusiveConfigurationPropertiesException
所有已实现的接口:
Serializable

public class MutuallyExclusiveConfigurationPropertiesException extends RuntimeException
Exception thrown when more than one mutually exclusive configuration property has been configured.
从以下版本开始:
4.0
作者:
Andy Wilkinson, Phillip Webb, Harry Yang
另请参阅:
  • 构造器详细资料

    • MutuallyExclusiveConfigurationPropertiesException

      public MutuallyExclusiveConfigurationPropertiesException(Collection<String> configuredNames, Collection<String> mutuallyExclusiveNames)
      Creates a new instance for mutually exclusive configuration properties when two or more of those properties have been configured.
      参数:
      configuredNames - the names of the properties that have been configured
      mutuallyExclusiveNames - the names of the properties that are mutually exclusive
  • 方法详细资料

    • getConfiguredNames

      public Set<String> getConfiguredNames()
      Return the names of the properties that have been configured.
      返回:
      the names of the configured properties
    • getMutuallyExclusiveNames

      public Set<String> getMutuallyExclusiveNames()
      Return the names of the properties that are mutually exclusive.
      返回:
      the names of the mutually exclusive properties
    • throwIfMultipleNonNullValuesIn

      public static void throwIfMultipleNonNullValuesIn(Consumer<Map<String,Object>> entries)
      Throw a new MutuallyExclusiveConfigurationPropertiesException if multiple non-null values are defined in a set of entries.
      参数:
      entries - a consumer used to populate the entries to check