|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder
public class ArgumentMatcherPositionFinder
Utility class for locating argument matchers in method invocations.
| Nested Class Summary | |
|---|---|
protected static class |
ArgumentMatcherPositionFinder.ArgumentMatcherValue
A value representing a found argument matcher invocation |
protected static class |
ArgumentMatcherPositionFinder.MethodAnalyzer
Analyzer that passes the line nrs to the given interpreter. |
protected static class |
ArgumentMatcherPositionFinder.MethodInterpreter
Interpreter that implements the argument matcher finder behavior. |
| Constructor Summary | |
|---|---|
ArgumentMatcherPositionFinder()
|
|
| Method Summary | |
|---|---|
protected static List<Integer> |
findArgumentMatcherIndexes(org.objectweb.asm.tree.ClassNode classNode,
org.objectweb.asm.tree.MethodNode methodNode,
Class<?> interpretedClass,
String interpretedMethodName,
Method invokedMethod,
int fromLineNr,
int toLineNr,
int index)
Locates the argument matchers for the method invocation on the given line. |
static List<Integer> |
getArgumentMatcherIndexes(Class<?> clazz,
String methodName,
Method invokedMethod,
int fromLineNr,
int toLineNr,
int index)
Locates the argument matchers for the method invocation on the given line. |
static List<Integer> |
getArgumentMatcherIndexes(ProxyInvocation proxyInvocation,
int fromLineNr,
int toLineNr,
int index)
Locates the argument matchers for the given proxy method invocation. |
protected static org.objectweb.asm.tree.ClassNode |
readClass(Class<?> clazz)
Uses ASM to read the byte code of the given class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArgumentMatcherPositionFinder()
| Method Detail |
|---|
public static List<Integer> getArgumentMatcherIndexes(ProxyInvocation proxyInvocation,
int fromLineNr,
int toLineNr,
int index)
proxyInvocation - The method invocation, not nullfromLineNr - The begin line-nr of the invocationtoLineNr - The end line-nr of the invocation (could be different from the begin line-nr if the invocation is written on more than 1 line)index - The index of the matcher on that line, 1 for the first, 2 for the second etc
public static List<Integer> getArgumentMatcherIndexes(Class<?> clazz,
String methodName,
Method invokedMethod,
int fromLineNr,
int toLineNr,
int index)
clazz - The class containing the method invocation, not nullmethodName - The method containing the method invocation, not nullinvokedMethod - The invocation to look for, not nullfromLineNr - The begin line-nr of the invocationtoLineNr - The end line-nr of the invocation (could be different from the begin line-nr if the invocation is written on more than 1 line)index - The index of the matcher on that line, 1 for the first, 2 for the second etc
protected static org.objectweb.asm.tree.ClassNode readClass(Class<?> clazz)
clazz - The class to read, not null
protected static List<Integer> findArgumentMatcherIndexes(org.objectweb.asm.tree.ClassNode classNode,
org.objectweb.asm.tree.MethodNode methodNode,
Class<?> interpretedClass,
String interpretedMethodName,
Method invokedMethod,
int fromLineNr,
int toLineNr,
int index)
classNode - The class containing the method invocation, not nullmethodNode - The method containing the method invocation, not nullinterpretedClass - The current class, not nullinterpretedMethodName - The current method name, not nullinvokedMethod - The invocation to look for, not nullfromLineNr - The begin line-nr of the invocationtoLineNr - The end line-nr of the invocation (could be different from the begin line-nr if the invocation is written on more than 1 line)index - The index of the matcher on that line, 1 for the first, 2 for the second etc
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||