Example usage for org.eclipse.jdt.core.dom SuperMethodInvocation toString

List of usage examples for org.eclipse.jdt.core.dom SuperMethodInvocation toString

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom SuperMethodInvocation toString.

Prototype

@Override
public final String toString() 

Source Link

Document

Returns a string representation of this node suitable for debugging purposes only.

Usage

From source file:org.evosuite.junit.TestExtractingVisitor.java

License:Open Source License

/** {@inheritDoc} */
@Override//from   w w  w.jav a 2  s .c  om
public void endVisit(SuperMethodInvocation superMethodInvocation) {
    List<?> paramTypes = Arrays.asList(superMethodInvocation.resolveMethodBinding().getParameterTypes());
    List<VariableReference> params = convertParams(superMethodInvocation.arguments(), paramTypes);
    String name = superMethodInvocation.getName().getIdentifier();
    MethodDef methodDef = testCase.getParent().getMethod(name);
    VariableReference retVal = retrieveResultReference(superMethodInvocation);
    retVal.setOriginalCode(superMethodInvocation.toString());
    testCase.convertMethod(methodDef, params, retVal);
}

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;
    }//w ww.  j  av  a  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;
}

From source file:padl.creator.javafile.eclipse.astVisitors.CompleteVisitor.java

License:Open Source License

@Override
public void endVisit(final SuperMethodInvocation node) {
    ProxyConsole.getInstance().debugOutput().println(
            " SuperMethodInvocation " + node.toString() + node.resolveTypeBinding().getQualifiedName());
    super.endVisit(node);
}