Example usage for org.eclipse.jdt.internal.compiler.ast Argument traverse

List of usage examples for org.eclipse.jdt.internal.compiler.ast Argument traverse

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast Argument traverse.

Prototype

public void traverse(ASTVisitor visitor, ClassScope scope) 

Source Link

Usage

From source file:spoon.support.compiler.jdt.JDTTreeBuilder.java

License:Open Source License

@Override
public boolean visit(LambdaExpression lambdaExpression, BlockScope blockScope) {
    CtLambda<?> lambda = factory.Core().createLambda();

    final MethodBinding methodBinding = lambdaExpression.getMethodBinding();
    if (methodBinding != null) {
        lambda.setSimpleName(String.valueOf(methodBinding.constantPoolName()));
    }//from   w ww  .j a v a2  s. c o m

    context.enter(lambda, lambdaExpression);

    final Argument[] arguments = lambdaExpression.arguments();
    if (arguments != null && arguments.length > 0) {
        for (Argument e : arguments) {
            e.traverse(this, blockScope);
        }
    }

    if (lambdaExpression.body() != null) {
        lambdaExpression.body().traverse(this, blockScope);
    }

    return false;
}