Last active
June 2, 2016 23:10
-
-
Save mroger/0e5c80ed5c4dc66da09d95f3c7d9e087 to your computer and use it in GitHub Desktop.
MagicMatcherElse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MagicMatcher <T> implements InvocationHandler { | |
//... | |
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | |
if () { | |
//... | |
} else { | |
if (args.length > 1) { | |
throw new IllegalArgumentException("Cannot assert more than one argument at once."); | |
} | |
methodMap.put(method.getName(), args[0]); | |
return proxy; | |
} | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment