public boolean visit(ConstructorInvocation node) { if (node.getAST().apiLevel() >= JLS3_INTERNAL) { visitList(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>')); } this.result.append("this("); //$NON-NLS-1$ visitList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, String.valueOf(',')); this.result.append(");"); //$NON-NLS-1$ return false; }
@Override public boolean visit(ConstructorInvocation node) { if (node.getAST().apiLevel() >= JLS3_INTERNAL) { visitList(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>')); } this.result.append("this("); //$NON-NLS-1$ visitList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, String.valueOf(',')); this.result.append(");"); //$NON-NLS-1$ return false; }
public boolean visit(ConstructorInvocation node) { if (node.getAST().apiLevel() >= JLS3_INTERNAL) { visitList(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>')); } this.result.append("this("); //$NON-NLS-1$ visitList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, String.valueOf(',')); this.result.append(");"); //$NON-NLS-1$ return false; }
public boolean visit(ConstructorInvocation node) { if (node.getAST().apiLevel() >= JLS3_INTERNAL) { visitList(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>')); } this.result.append("this("); //$NON-NLS-1$ visitList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, String.valueOf(',')); this.result.append(");"); //$NON-NLS-1$ return false; }
public boolean visit(ConstructorInvocation node) { if (node.getAST().apiLevel() >= AST.JLS3) { visitList(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>')); } this.result.append("this("); //$NON-NLS-1$ visitList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, String.valueOf(',')); this.result.append(");"); //$NON-NLS-1$ return false; }
public boolean visit(ConstructorInvocation node) { if (node.getAST().apiLevel() >= JLS3_INTERNAL) { visitList(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>')); } this.result.append("this("); //$NON-NLS-1$ visitList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, String.valueOf(',')); this.result.append(");"); //$NON-NLS-1$ return false; }
@Override public boolean visit(ConstructorInvocation node) { if (node.getAST().apiLevel() >= JLS3) { if (!node.typeArguments().isEmpty()) { this.fBuffer.append("<");//$NON-NLS-1$ for (Iterator<Type> it= node.typeArguments().iterator(); it.hasNext();) { Type t= it.next(); t.accept(this); if (it.hasNext()) { this.fBuffer.append(",");//$NON-NLS-1$ } } this.fBuffer.append(">");//$NON-NLS-1$ } } this.fBuffer.append("this(");//$NON-NLS-1$ for (Iterator<Expression> it= node.arguments().iterator(); it.hasNext();) { Expression e= it.next(); e.accept(this); if (it.hasNext()) { this.fBuffer.append(",");//$NON-NLS-1$ } } this.fBuffer.append(");");//$NON-NLS-1$ return false; }
public boolean visit(ConstructorInvocation node) { printIndent(); if (node.getAST().apiLevel() >= JLS3) { if (!node.typeArguments().isEmpty()) { this.buffer.append("<");//$NON-NLS-1$ for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) { Type t = (Type) it.next(); t.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(">");//$NON-NLS-1$ } } this.buffer.append("this(");//$NON-NLS-1$ for (Iterator it = node.arguments().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(");\n");//$NON-NLS-1$ return false; }
public boolean visit(ConstructorInvocation node) { 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("this(");//$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; }
public boolean visit(ConstructorInvocation node) { printIndent(); if (node.getAST().apiLevel() >= JLS3) { if (!node.typeArguments().isEmpty()) { this.buffer.append("<");//$NON-NLS-1$ for (Iterator it = node.typeArguments().iterator(); it.hasNext(); ) { Type t = (Type) it.next(); t.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(">");//$NON-NLS-1$ } } this.buffer.append("this(");//$NON-NLS-1$ for (Iterator it = node.arguments().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(");\n");//$NON-NLS-1$ return false; }
public boolean visit(ConstructorInvocation node) { if (!isSelected(node)) return false; return handleExceptions(node.resolveConstructorBinding(), node.getAST()); }
public boolean visit(ConstructorInvocation node) { IValueList types = new IValueList(values); if (node.getAST().apiLevel() >= AST.JLS3) { if (!node.typeArguments().isEmpty()) { for (Iterator it = node.typeArguments().iterator(); it.hasNext();) { Type t = (Type) it.next(); types.add(visitChild(t)); } } } IValueList arguments = new IValueList(values); for (Iterator it = node.arguments().iterator(); it.hasNext();) { Expression e = (Expression) it.next(); arguments.add(visitChild(e)); } ownValue = constructStatementNode("constructorCall", values.bool(false), arguments.asList()); //setKeywordParameters("typeParameters", types); return false; }
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ public boolean match(ConstructorInvocation node, Object other) { if (!(other instanceof ConstructorInvocation)) { return false; } ConstructorInvocation o = (ConstructorInvocation) other; if (node.getAST().apiLevel >= AST.JLS3_INTERNAL) { if (!safeSubtreeListMatch(node.typeArguments(), o.typeArguments())) { return false; } } return safeSubtreeListMatch(node.arguments(), o.arguments()); }
/** * Returns whether the given node and the other object match. * <p> * The default implementation provided by this class tests whether the * other object is a node of the same type with structurally isomorphic * child subtrees. Subclasses may override this method as needed. * </p> * * @param node the node * @param other the other object, or <code>null</code> * @return <code>true</code> if the subtree matches, or * <code>false</code> if they do not match or the other object has a * different node type or is <code>null</code> */ public boolean match(ConstructorInvocation node, Object other) { if (!(other instanceof ConstructorInvocation)) { return false; } ConstructorInvocation o = (ConstructorInvocation) other; if (node.getAST().apiLevel >= AST.JLS3_INTERNAL) { if (!safeSubtreeListMatch(node.typeArguments(), o.typeArguments())) { return false; } } return safeSubtreeListMatch(node.arguments(), o.arguments()); }
public boolean visit(ConstructorInvocation node) { if (!hasChildrenChanges(node)) { return doVisitUnchangedChildren(node); } int pos= node.getStartPosition(); if (node.getAST().apiLevel() >= JLS3_INTERNAL) { pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false); } try { pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos); rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$ } catch (CoreException e) { handleException(e); } return false; }
public boolean visit(ConstructorInvocation node) { if (!hasChildrenChanges(node)) { return doVisitUnchangedChildren(node); } int pos= node.getStartPosition(); if (node.getAST().apiLevel() >= JLS3_INTERNAL) { pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false); } try { pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos); rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$ } catch (CoreException e) { handleException(e); } return false; }
public boolean visit(ConstructorInvocation node) { if (!hasChildrenChanges(node)) { return doVisitUnchangedChildren(node); } int pos= node.getStartPosition(); if (node.getAST().apiLevel() >= JLS3_INTERNAL) { pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false); } try { pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos); rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$ } catch (CoreException e) { handleException(e); } return false; }
public boolean visit(ConstructorInvocation node) { if (!hasChildrenChanges(node)) { return doVisitUnchangedChildren(node); } int pos= node.getStartPosition(); if (node.getAST().apiLevel() >= JLS3_INTERNAL) { pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false); } try { pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos); rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$ } catch (CoreException e) { handleException(e); } return false; }
public boolean visit(ConstructorInvocation node) { if (!hasChildrenChanges(node)) { return doVisitUnchangedChildren(node); } int pos= node.getStartPosition(); if (node.getAST().apiLevel() >= AST.JLS3) { pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, "", false, false); //$NON-NLS-1$ } try { pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos); rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, "", ", "); //$NON-NLS-1$ //$NON-NLS-2$ } catch (CoreException e) { handleException(e); } return false; }
@Override public boolean visit(ConstructorInvocation node) { if (!hasChildrenChanges(node)) { return doVisitUnchangedChildren(node); } int pos= node.getStartPosition(); if (node.getAST().apiLevel() >= JLS3_INTERNAL) { pos= rewriteOptionalTypeParameters(node, ConstructorInvocation.TYPE_ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, false, false); } try { pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos); rewriteNodeList(node, ConstructorInvocation.ARGUMENTS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$ } catch (CoreException e) { handleException(e); } return false; }