Class MessageBuilderInvocationHandler
java.lang.Object
io.fluentlenium.core.conditions.message.MessageBuilderInvocationHandler
- All Implemented Interfaces:
InvocationHandler
Invocation handler that builds message based on called performed.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageBuilderInvocationHandler
(String context) Creates a new message builder invocation handler.MessageBuilderInvocationHandler
(String context, Object instance) Creates a new message builder invocation handler.Creates a new message builder invocation handler, with initial calls. -
Method Summary
-
Constructor Details
-
MessageBuilderInvocationHandler
Creates a new message builder invocation handler.- Parameters:
context
- base context of the generated message
-
MessageBuilderInvocationHandler
Creates a new message builder invocation handler.- Parameters:
context
- base context of the generated messageinstance
- underlying wrapped instance. If not null, calls will also be performed on this instance.
-
MessageBuilderInvocationHandler
Creates a new message builder invocation handler, with initial calls.- Parameters:
calls
- initial calls.
-
-
Method Details
-
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
buildMessage
Build the message based on annotations from methods called previously.- Returns:
- built message
- Throws:
IllegalStateException
- if one of the recorded call has no @Message/@NotMessage annotation.
-