Example usage for org.aspectj.org.eclipse.jdt.core.dom PointcutDeclaration parameters

List of usage examples for org.aspectj.org.eclipse.jdt.core.dom PointcutDeclaration parameters

Introduction

In this page you can find the example usage for org.aspectj.org.eclipse.jdt.core.dom PointcutDeclaration parameters.

Prototype

ASTNode.NodeList parameters

To view the source code for org.aspectj.org.eclipse.jdt.core.dom PointcutDeclaration parameters.

Click Source Link

Usage

From source file:ajdtplugin.AjNaiveASTFlattener.java

License:Open Source License

public boolean visit(PointcutDeclaration node) {
    ////from   w  w w.  j  av a 2  s .c om
    Pointcut point = new Pointcut();

    printIndent();
    buffer.append(" pointcut ");
    node.getName().accept(this);

    point.pointcutName = node.getName().toString();

    buffer.append("(");
    List<?> parameters = node.parameters();
    for (Iterator<?> iter = parameters.iterator(); iter.hasNext();) {
        SingleVariableDeclaration element = (SingleVariableDeclaration) iter.next();
        buffer.append(element.getType().toString() + " " + element.getName() + "");
        //
        point.getParameterTypes().add(element.getType().toString());
        if (iter.hasNext())
            buffer.append(", ");
    }
    buffer.append(") :");
    //add to list of pointcuts 
    points.add(point);

    node.getDesignator().accept(this);
    buffer.append(";\n");
    return false;
}