Example usage for org.eclipse.jdt.core.dom TypeParameter getAST

List of usage examples for org.eclipse.jdt.core.dom TypeParameter getAST

Introduction

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

Prototype

public final AST getAST() 

Source Link

Document

Returns this node's AST.

Usage

From source file:org.codemucker.jmutate.ast.JAstFlattener.java

License:Open Source License

public boolean visit(TypeParameter node) {
    if (node.getAST().apiLevel() >= AST.JLS8) {
        printModifiers(node.modifiers());
    }//from  w ww  .  j  ava  2 s. c om
    node.getName().accept(this);
    if (!node.typeBounds().isEmpty()) {
        this.buffer.append(" extends ");//$NON-NLS-1$
        for (Iterator it = node.typeBounds().iterator(); it.hasNext();) {
            Type t = (Type) it.next();
            t.accept(this);
            if (it.hasNext()) {
                this.buffer.append(" & ");//$NON-NLS-1$
            }
        }
    }
    return false;
}

From source file:org.spoofax.interpreter.adapter.ecj.ECJFactory.java

License:LGPL

private TypeParameter asTypeParameter(IStrategoTerm term) {
    TypeParameter x = ((WrappedTypeParameter) term).getWrappee();
    return x.getParent() == null && x.getAST() == ast ? x : (TypeParameter) ASTNode.copySubtree(ast, x);
}