Class MessageProxy
- java.lang.Object
-
- org.fluentlenium.core.conditions.message.MessageProxy
-
public final class MessageProxy extends java.lang.Object
Provides message proxy implementations of interface that records calls to build message from methods annotated withMessage
,NotMessage
andMessageContext
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
builder(java.lang.Class<T> messageClass, java.lang.String context)
static <T> T
builder(java.lang.Class<T> messageClass, java.util.List<MessageBuilderCall> calls)
static java.lang.String
message(java.lang.Object proxy)
Build the message from a proxystatic <T> T
wrap(java.lang.Class<T> messageClass, java.lang.Object instance, java.lang.String context)
static <T> T
wrap(java.lang.Class<T> messageClass, java.lang.Object instance, java.util.List<MessageBuilderCall> calls)
-
-
-
Method Detail
-
wrap
public static <T> T wrap(java.lang.Class<T> messageClass, java.lang.Object instance, java.lang.String context)
- Type Parameters:
T
- type of the class to wrap.- Parameters:
messageClass
- class to wrap in the proxy.instance
- original instance.context
- initial context for generated message.- Returns:
- a proxy generating message from annotations.
-
wrap
public static <T> T wrap(java.lang.Class<T> messageClass, java.lang.Object instance, java.util.List<MessageBuilderCall> calls)
- Type Parameters:
T
- type of the class to wrap.- Parameters:
messageClass
- class to wrap in the proxy.instance
- original instance.calls
- call stack of the proxy.- Returns:
- a proxy generating message from annotations.
-
builder
public static <T> T builder(java.lang.Class<T> messageClass, java.lang.String context)
- Type Parameters:
T
- type of the class to wrap.- Parameters:
messageClass
- class to wrap in the proxy.context
- initial context for generated message.- Returns:
- a proxy generating message from annotations.
-
builder
public static <T> T builder(java.lang.Class<T> messageClass, java.util.List<MessageBuilderCall> calls)
- Type Parameters:
T
- type of the class to wrap.- Parameters:
messageClass
- class to wrap in the proxy.calls
- call stack of the proxy.- Returns:
- a proxy generating message from annotations.
-
message
public static java.lang.String message(java.lang.Object proxy)
Build the message from a proxy- Parameters:
proxy
- message builder proxy- Returns:
- generated message.
-
-