1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
8 * @author Matthieu Casanova
10 public class FunctionCall extends AbstractSuffixExpression {
12 /** the function name. */
13 public Expression prefix;
16 public Expression[] args;
18 public FunctionCall(final Expression prefix,
19 final Expression[] args,
20 final int sourceEnd) {
21 super(prefix.getSourceStart(), sourceEnd);
27 * Return the expression as String.
28 * @return the expression
30 public String toStringExpression() {
31 final StringBuffer buff = new StringBuffer(prefix.toStringExpression());
34 for (int i = 0; i < args.length; i++) {
35 final Expression arg = args[i];
39 buff.append(arg.toStringExpression());
43 return buff.toString();
47 * Get the variables from outside (parameters, globals ...)
48 * @return the variables from outside
50 public List getOutsideVariable() {
51 return new ArrayList(1);
55 * get the modified variables.
56 * @return the variables from we change value
58 public List getModifiedVariable() {
60 return new ArrayList(1);
62 final ArrayList list = new ArrayList();
63 for (int i = 0; i < args.length; i++) {
64 list.addAll(args[i].getModifiedVariable());
70 * Get the variables used.
71 * @return the variables used
73 public List getUsedVariable() {
74 final List list = prefix.getUsedVariable();
76 for (int i = 0; i < args.length; i++) {
77 list.addAll(args[i].getUsedVariable());