@Override public ITypeConstraint[] create(ConstructorInvocation invocation){ List<Expression> arguments= invocation.arguments(); List<ITypeConstraint> result= new ArrayList<>(arguments.size()); IMethodBinding methodBinding= invocation.resolveConstructorBinding(); result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding))); return result.toArray(new ITypeConstraint[result.size()]); }
public ITypeConstraint[] create(ConstructorInvocation invocation){ List arguments= invocation.arguments(); List result= new ArrayList(arguments.size()); IMethodBinding methodBinding= invocation.resolveConstructorBinding(); result.addAll(Arrays.asList(getArgumentConstraints(arguments, methodBinding))); return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]); }
@Override public boolean visit(ConstructorInvocation node) { int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN) : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN); int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN); handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation); return true; }
@Override public boolean visit(ConstructorInvocation node) { int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN) : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN); int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN); handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation); return true; }
@Override public boolean visit(ConstructorInvocation node) { int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN) : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN); int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN); handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation); return true; }
@Override public boolean visit(ConstructorInvocation node) { int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN) : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN); int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN); handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation); return true; }
@Override public void endVisit(ConstructorInvocation node) { if (skipNode(node)) { return; } processSequential(node, node.arguments()); }
@Override public final void endVisit(final ConstructorInvocation node) { final IMethodBinding binding= node.resolveConstructorBinding(); if (binding != null) endVisit(node.arguments(), binding); }
@Override final List internalGetChildListProperty(ChildListPropertyDescriptor property) { if (property == ARGUMENTS_PROPERTY) { return arguments(); } if (property == TYPE_ARGUMENTS_PROPERTY) { return typeArguments(); } // allow default implementation to flag the error return super.internalGetChildListProperty(property); }
@Override public void endVisit(ConstructorInvocation node) { if (skipNode(node)) return; processSequential(node, node.arguments()); }
@Override public boolean visit(ConstructorInvocation node) { handleArguments(node.arguments(), this.options.alignment_for_arguments_in_explicit_constructor_call); handleTypeArguments(node.typeArguments()); return true; }
@Override public boolean visit(ConstructorInvocation node) { handleArguments(node.arguments(), this.options.alignment_for_arguments_in_explicit_constructor_call); handleTypeArguments(node.typeArguments()); return true; }
ASTNode clone0(AST target) { ConstructorInvocation result = new ConstructorInvocation(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments())); } result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); return result; }
@Override ASTNode clone0(AST target) { ConstructorInvocation result = new ConstructorInvocation(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments())); } result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); return result; }
ASTNode clone0(AST target) { ConstructorInvocation result = new ConstructorInvocation(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); if (this.ast.apiLevel >= AST.JLS3_INTERNAL) { result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments())); } result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); return result; }
ASTNode clone0(AST target) { ConstructorInvocation result = new ConstructorInvocation(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); if (this.ast.apiLevel >= AST.JLS3) { result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments())); } result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); return result; }
@Override public boolean visit(ConstructorInvocation node) { handleTypeArguments(node.typeArguments()); handleInvocation(node, node); handleCommas(node.arguments(), this.options.insert_space_before_comma_in_explicit_constructor_call_arguments, this.options.insert_space_after_comma_in_explicit_constructor_call_arguments); return true; }
@Override public boolean visit(ConstructorInvocation node) { handleTypeArguments(node.typeArguments()); handleInvocation(node, node); handleCommas(node.arguments(), this.options.insert_space_before_comma_in_explicit_constructor_call_arguments, this.options.insert_space_after_comma_in_explicit_constructor_call_arguments); return true; }
@Override public boolean visit(ConstructorInvocation node) { handleTypeArguments(node.typeArguments()); handleInvocation(node, node); handleCommas(node.arguments(), this.options.insert_space_before_comma_in_explicit_constructor_call_arguments, this.options.insert_space_after_comma_in_explicit_constructor_call_arguments); return true; }
@Override public boolean visit(final ConstructorInvocation node) { boolean _isEmpty = node.typeArguments().isEmpty(); boolean _not = (!_isEmpty); if (_not) { this.appendTypeParameters(node.typeArguments()); } this.appendToBuffer("this("); this.visitAllSeparatedByComma(node.arguments()); this.appendToBuffer(")"); return false; }