List of usage examples for org.eclipse.jdt.core.dom SuperMethodInvocation getParent
public final ASTNode getParent()
null if this is the root node. From source file:org.evosuite.junit.TestExtractingVisitor.java
License:Open Source License
private VariableReference retrieveResultReference(SuperMethodInvocation superMethodInvocation) { // TODO Duplicate code from retrieveResultReference(MethodInvocation) // too bad they don't have a common matching interface VariableReference result = calleeResultMap.get(superMethodInvocation.toString()); if (result != null) { return result; }//from ww w. java 2 s . c o m ASTNode parent = superMethodInvocation.getParent(); if (parent instanceof VariableDeclarationFragment) { return retrieveVariableReference(parent, null); } if (parent instanceof Assignment) { Assignment assignment = (Assignment) parent; return retrieveVariableReference(assignment.getLeftHandSide(), null); } IMethodBinding methodBinding = superMethodInvocation.resolveMethodBinding(); result = retrieveVariableReference(methodBinding.getReturnType(), null); calleeResultMap.put(superMethodInvocation.toString(), result); return result; }