public boolean visit(SuperConstructorInvocation node) {
   if (matches(node.resolveConstructorBinding())) {
     SimpleName name = fAST.newSimpleName("xxxxx"); // $NON-NLS-1$
     name.setSourceRange(node.getStartPosition(), 5);
     fResult.add(name);
   }
   return super.visit(node);
 }
Ejemplo n.º 2
0
 /*
  * @see ASTVisitor#visit(SuperConstructorInvocation)
  */
 public boolean visit(SuperConstructorInvocation node) {
   if (node.getExpression() != null) {
     node.getExpression().accept(this);
     this.fBuffer.append("."); // $NON-NLS-1$
   }
   if (node.getAST().apiLevel() >= AST.JLS3) {
     if (!node.typeArguments().isEmpty()) {
       this.fBuffer.append("<"); // $NON-NLS-1$
       for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) {
         Type t = (Type) it.next();
         t.accept(this);
         if (it.hasNext()) {
           this.fBuffer.append(","); // $NON-NLS-1$
         }
       }
       this.fBuffer.append(">"); // $NON-NLS-1$
     }
   }
   this.fBuffer.append("super("); // $NON-NLS-1$
   for (Iterator it = node.arguments().iterator(); it.hasNext(); ) {
     Expression e = (Expression) it.next();
     e.accept(this);
     if (it.hasNext()) {
       this.fBuffer.append(","); // $NON-NLS-1$
     }
   }
   this.fBuffer.append(");"); // $NON-NLS-1$
   return false;
 }