|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.test.mock.MockPlayerMixin
public class MockPlayerMixin
Generic mixin for mock composites. Overrides any generic mixins but not typed mixins, as typed mixins have precedence
over generic mixins. To override a typed mixin MockPlayerConcern
can be used.
MockResolver player mixin will delegate method invocations to registered mocks. Mocks can be registered by using
MockComposite
.
If there is no mock registered to handle the method invocation invocation will fail by throwing an
IllegalStateException.
Constructor Summary | |
---|---|
MockPlayerMixin()
|
Method Summary | |
---|---|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Finds a registered mock that can handle the method invocation and delegate to it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockPlayerMixin()
Method Detail |
---|
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
InvocationHandler.invoke(Object, java.lang.reflect.Method, Object[])
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |