1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
7 * @author Matthieu Casanova
9 public class FunctionCall extends AbstractSuffixExpression {
11 public Expression prefix;
12 public Expression[] args;
14 public FunctionCall(final Expression prefix,
15 final Expression[] args,
16 final int sourceEnd) {
17 super(prefix.sourceStart, sourceEnd);
23 * Return the expression as String.
24 * @return the expression
26 public String toStringExpression() {
27 final StringBuffer buff = new StringBuffer(prefix.toStringExpression());
30 for (int i = 0; i < args.length; i++) {
31 final Expression arg = args[i];
35 buff.append(arg.toStringExpression());
39 return buff.toString();
43 * Get the variables from outside (parameters, globals ...)
44 * @return the variables from outside
46 public List getOutsideVariable() {
47 return new ArrayList();
51 * get the modified variables.
52 * @return the variables from we change value
54 public List getModifiedVariable() {
55 final ArrayList list = new ArrayList();
56 for (int i = 0; i < args.length; i++) {
57 list.addAll(args[i].getModifiedVariable());
63 * Get the variables used.
64 * @return the variables used
66 public List getUsedVariable() {
67 final ArrayList list = new ArrayList();
68 list.addAll(prefix.getUsedVariable());
69 for (int i = 0; i < args.length; i++) {
70 list.addAll(args[i].getUsedVariable());