Search in sources :

Example 16 with TypeParameter

use of org.eclipse.jdt.core.dom.TypeParameter in project generator by mybatis.

the class MethodSignatureStringifier method visitTypeParameters.

@SuppressWarnings("unchecked")
private void visitTypeParameters(MethodDeclaration node) {
    if (!node.typeParameters().isEmpty()) {
        buffer.append('<');
        for (Iterator<TypeParameter> it = node.typeParameters().iterator(); it.hasNext(); ) {
            TypeParameter t = it.next();
            t.accept(this);
            if (it.hasNext()) {
                buffer.append(',');
            }
        }
        //$NON-NLS-1$
        buffer.append("> ");
    }
}
Also used : TypeParameter(org.eclipse.jdt.core.dom.TypeParameter)

Aggregations

TypeParameter (org.eclipse.jdt.core.dom.TypeParameter)16 ITypeBinding (org.eclipse.jdt.core.dom.ITypeBinding)6 MethodDeclaration (org.eclipse.jdt.core.dom.MethodDeclaration)6 ASTNode (org.eclipse.jdt.core.dom.ASTNode)5 Type (org.eclipse.jdt.core.dom.Type)5 TypeDeclaration (org.eclipse.jdt.core.dom.TypeDeclaration)4 ITypeParameter (org.eclipse.jdt.core.ITypeParameter)3 AbstractTypeDeclaration (org.eclipse.jdt.core.dom.AbstractTypeDeclaration)3 CompilationUnit (org.eclipse.jdt.core.dom.CompilationUnit)3 SingleVariableDeclaration (org.eclipse.jdt.core.dom.SingleVariableDeclaration)3 ArrayList (java.util.ArrayList)2 CoreException (org.eclipse.core.runtime.CoreException)2 AST (org.eclipse.jdt.core.dom.AST)2 ArrayType (org.eclipse.jdt.core.dom.ArrayType)2 BodyDeclaration (org.eclipse.jdt.core.dom.BodyDeclaration)2 Javadoc (org.eclipse.jdt.core.dom.Javadoc)2 ParameterizedType (org.eclipse.jdt.core.dom.ParameterizedType)2 PrimitiveType (org.eclipse.jdt.core.dom.PrimitiveType)2 ImportRewriteContext (org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext)2 ContextSensitiveImportRewriteContext (org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext)2