Class MessageProxy
- java.lang.Object
-
- org.fluentlenium.core.conditions.message.MessageProxy
-
public final class MessageProxy extends 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(Class<T> messageClass, String context)
static <T> T
builder(Class<T> messageClass, List<MessageBuilderCall> calls)
static String
message(Object proxy)
Build the message from a proxystatic <T> T
wrap(Class<T> messageClass, Object instance, String context)
static <T> T
wrap(Class<T> messageClass, Object instance, List<MessageBuilderCall> calls)
-
-
-
Method Detail
-
wrap
public static <T> T wrap(Class<T> messageClass, Object instance, 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(Class<T> messageClass, Object instance, 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(Class<T> messageClass, 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(Class<T> messageClass, 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.
-
-