Search in sources :

Example 1 with MethodSignatureStringifier

use of org.mybatis.generator.eclipse.core.merge.visitors.MethodSignatureStringifier in project generator by mybatis.

the class ExistingJavaFileVisitor method visit.

/**
     * Find the generated methods and delete them
     */
@Override
public boolean visit(MethodDeclaration node) {
    if (isGenerated(node)) {
        List<Annotation> annotations = retrieveAnnotations(node);
        if (!annotations.isEmpty()) {
            MethodSignatureStringifier mss = new MethodSignatureStringifier();
            node.accept(mss);
            String methodSignature = mss.toString();
            methodAnnotations.put(methodSignature, annotations);
        }
        node.delete();
    }
    return false;
}
Also used : MethodSignatureStringifier(org.mybatis.generator.eclipse.core.merge.visitors.MethodSignatureStringifier) Annotation(org.eclipse.jdt.core.dom.Annotation)

Example 2 with MethodSignatureStringifier

use of org.mybatis.generator.eclipse.core.merge.visitors.MethodSignatureStringifier in project generator by mybatis.

the class SummaryGatheringVisitor method visit.

@Override
public boolean visit(MethodDeclaration node) {
    MethodSignatureStringifier visitor = new MethodSignatureStringifier();
    node.accept(visitor);
    methodSignatures.add(visitor.toString());
    return false;
}
Also used : MethodSignatureStringifier(org.mybatis.generator.eclipse.core.merge.visitors.MethodSignatureStringifier)

Example 3 with MethodSignatureStringifier

use of org.mybatis.generator.eclipse.core.merge.visitors.MethodSignatureStringifier in project generator by mybatis.

the class ExistingJavaFileVisitor method getMethodAnnotations.

public List<Annotation> getMethodAnnotations(MethodDeclaration methodDeclaration) {
    MethodSignatureStringifier mss = new MethodSignatureStringifier();
    methodDeclaration.accept(mss);
    return methodAnnotations.get(mss.toString());
}
Also used : MethodSignatureStringifier(org.mybatis.generator.eclipse.core.merge.visitors.MethodSignatureStringifier)

Aggregations

MethodSignatureStringifier (org.mybatis.generator.eclipse.core.merge.visitors.MethodSignatureStringifier)3 Annotation (org.eclipse.jdt.core.dom.Annotation)1