1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
8 * @author Matthieu Casanova
10 public class ClassAccess extends AbstractSuffixExpression {
12 public static final int STATIC = 0;
13 public static final int NORMAL = 1;
15 public Expression prefix;
16 public Expression suffix;
19 public ClassAccess(final Expression prefix,
20 final Expression suffix,
22 super(prefix.sourceStart, suffix.sourceEnd);
28 public String toStringOperator() {
30 case STATIC : return "::"; //$NON-NLS-1$
31 case NORMAL : return "->"; //$NON-NLS-1$
33 return "unknown operator"; //$NON-NLS-1$
37 * Return the expression as String.
38 * @return the expression
40 public String toStringExpression() {
41 final StringBuffer buff = new StringBuffer();
42 buff.append(prefix.toStringExpression());
43 buff.append(toStringOperator());
44 buff.append(suffix.toStringExpression());
45 return buff.toString();
49 * Get the variables from outside (parameters, globals ...)
50 * @return the variables from outside
52 public List getOutsideVariable() {
53 return new ArrayList();
57 * get the modified variables.
58 * @return the variables from we change value
60 public List getModifiedVariable() {
61 return new ArrayList();
65 * Get the variables used.
66 * @return the variables used
68 public List getUsedVariable() {
69 return prefix.getUsedVariable();