类 ConditionMessage
java.lang.Object
org.springframework.boot.autoconfigure.condition.ConditionMessage
A message associated with a
ConditionOutcome
. Provides a fluent builder style
API to encourage consistency across all condition messages.- 从以下版本开始:
- 1.4.1
- 作者:
- Phillip Webb
-
嵌套类概要
嵌套类修饰符和类型类说明final class
Builder used to create aConditionMessage
for a condition.final class
Builder used to create anConditionMessage.ItemsBuilder
for a condition.static enum
Render styles. -
方法概要
修饰符和类型方法说明andCondition
(Class<? extends Annotation> condition, Object... details) Return a new builder to construct a newConditionMessage
based on the instance and a new condition outcome.andCondition
(String condition, Object... details) Return a new builder to construct a newConditionMessage
based on the instance and a new condition outcome.Return a newConditionMessage
based on the instance and an appended message.static ConditionMessage
empty()
Factory method to return a new emptyConditionMessage
.boolean
static ConditionMessage.Builder
forCondition
(Class<? extends Annotation> condition, Object... details) Factory method for a builder to construct a newConditionMessage
for a condition.static ConditionMessage.Builder
forCondition
(String condition, Object... details) Factory method for a builder to construct a newConditionMessage
for a condition.int
hashCode()
boolean
isEmpty()
Returntrue
if the message is empty.static ConditionMessage
Factory method to create a newConditionMessage
with a specific message.static ConditionMessage
of
(Collection<? extends ConditionMessage> messages) Factory method to create a newConditionMessage
comprised of the specified messages.toString()
-
方法详细资料
-
isEmpty
public boolean isEmpty()Returntrue
if the message is empty.- 返回:
- if the message is empty
-
equals
-
hashCode
public int hashCode() -
toString
-
append
Return a newConditionMessage
based on the instance and an appended message.- 参数:
message
- the message to append- 返回:
- a new
ConditionMessage
instance
-
andCondition
public ConditionMessage.Builder andCondition(Class<? extends Annotation> condition, Object... details) Return a new builder to construct a newConditionMessage
based on the instance and a new condition outcome.- 参数:
condition
- the conditiondetails
- details of the condition- 返回:
- a
ConditionMessage.Builder
builder - 另请参阅:
-
andCondition
Return a new builder to construct a newConditionMessage
based on the instance and a new condition outcome.- 参数:
condition
- the conditiondetails
- details of the condition- 返回:
- a
ConditionMessage.Builder
builder - 另请参阅:
-
empty
Factory method to return a new emptyConditionMessage
.- 返回:
- a new empty
ConditionMessage
-
of
Factory method to create a newConditionMessage
with a specific message.- 参数:
message
- the source message (may be a format string ifargs
are specified)args
- format arguments for the message- 返回:
- a new
ConditionMessage
instance
-
of
Factory method to create a newConditionMessage
comprised of the specified messages.- 参数:
messages
- the source messages (may benull
)- 返回:
- a new
ConditionMessage
instance
-
forCondition
public static ConditionMessage.Builder forCondition(Class<? extends Annotation> condition, Object... details) Factory method for a builder to construct a newConditionMessage
for a condition.- 参数:
condition
- the conditiondetails
- details of the condition- 返回:
- a
ConditionMessage.Builder
builder - 另请参阅:
-
forCondition
Factory method for a builder to construct a newConditionMessage
for a condition.- 参数:
condition
- the conditiondetails
- details of the condition- 返回:
- a
ConditionMessage.Builder
builder - 另请参阅:
-