@Override public boolean visitMethodInvocation(lombok.ast.MethodInvocation node) { MessageSend inv = new MessageSend(); inv.sourceStart = start(node); inv.sourceEnd = end(node); inv.nameSourcePosition = pos(node.astName()); inv.arguments = toArray(Expression.class, node.astArguments()); inv.receiver = toExpression(node.astOperand()); if (inv.receiver instanceof NameReference) { inv.receiver.bits |= Binding.TYPE; } //TODO do we have an implicit this style call somewhere in our test sources? if (inv.receiver == null) { inv.receiver = new ThisReference(0, 0); inv.receiver.bits |= ASTNode.IsImplicitThis; } if (!node.astMethodTypeArguments().isEmpty()) inv.typeArguments = toArray(TypeReference.class, node.astMethodTypeArguments()); inv.selector = toName(node.astName()); return set(node, inv); }
@Override public boolean visitMethodInvocation(lombok.ast.MethodInvocation node) { MessageSend inv = new MessageSend(); inv.sourceStart = start(node); inv.sourceEnd = end(node); inv.nameSourcePosition = pos(node.astName()); inv.arguments = toArray(Expression.class, node.astArguments()); inv.receiver = toExpression(node.astOperand()); if (inv.receiver instanceof NameReference) { inv.receiver.bits |= Binding.TYPE; } //TODO do we have an implicit this style call somewhere in our test sources? if (inv.receiver == null) { inv.receiver = new ThisReference(0, 0); inv.receiver.bits |= ASTNode.IsImplicitThis; } if (!node.astMethodTypeArguments().isEmpty()) inv.typeArguments = toArray(TypeReference.class, node.astMethodTypeArguments()); inv.selector = toName(node.astName()); return set(node, inv); }
@Override public boolean visitMethodInvocation(lombok.ast.MethodInvocation node) { MessageSend inv = new MessageSend(); inv.sourceStart = start(node); inv.sourceEnd = end(node); inv.nameSourcePosition = pos(node.astName()); inv.arguments = toArray(Expression.class, node.astArguments()); inv.receiver = toExpression(node.astOperand()); if (inv.receiver instanceof NameReference) { inv.receiver.bits |= Binding.TYPE; } //TODO do we have an implicit this style call somewhere in our test sources? if (inv.receiver == null) { inv.receiver = new ThisReference(0, 0); inv.receiver.bits |= ASTNode.IsImplicitThis; } if (!node.astMethodTypeArguments().isEmpty()) inv.typeArguments = toArray(TypeReference.class, node.astMethodTypeArguments()); inv.selector = toName(node.astName()); return set(node, inv); }
@Override public boolean visitMethodInvocation(MethodInvocation node) { JCExpression methodId; if (node.astOperand() == null) { methodId = (JCExpression) toTree(node.astName()); } else { int start = hasSourceStructures() ? posOfStructure(node, ".", true) : node.astName().getPosition().getStart(); int end = node.astName().getPosition().getEnd(); methodId = setPos(start, end, treeMaker.Select( toExpression(node.astOperand()), toName(node.astName()))); } int start = posOfStructure(node, "(", true); int end = node.getPosition().getEnd(); return set(node, setPos(start, end, treeMaker.Apply( toList(JCExpression.class, node.astMethodTypeArguments()), methodId, toList(JCExpression.class, node.astArguments()) ))); }
@Override public boolean visitMethodInvocation(MethodInvocation node) { JCExpression methodId; if (node.astOperand() == null) { methodId = (JCExpression) toTree(node.astName()); } else { int start = hasSourceStructures() ? posOfStructure(node, ".", true) : node.astName().getPosition().getStart(); int end = node.astName().getPosition().getEnd(); methodId = setPos(start, end, treeMaker.Select( toExpression(node.astOperand()), toName(node.astName()))); } int start = posOfStructure(node, "(", true); int end = node.getPosition().getEnd(); return set(node, setPos(start, end, treeMaker.Apply( toList(JCExpression.class, node.astMethodTypeArguments()), methodId, toList(JCExpression.class, node.astArguments()) ))); }
@Override public boolean visitMethodInvocation(MethodInvocation node) { JCExpression methodId; if (node.astOperand() == null) { methodId = (JCExpression) toTree(node.astName()); } else { int start = hasSourceStructures() ? posOfStructure(node, ".", true) : node.astName().getPosition().getStart(); int end = node.astName().getPosition().getEnd(); methodId = setPos(start, end, treeMaker.Select( toExpression(node.astOperand()), toName(node.astName()))); } int start = posOfStructure(node, "(", true); int end = node.getPosition().getEnd(); return set(node, setPos(start, end, treeMaker.Apply( toList(JCExpression.class, node.astMethodTypeArguments()), methodId, toList(JCExpression.class, node.astArguments()) ))); }