1 package net.sourceforge.phpdt.internal.compiler.ast;
5 * @author Matthieu Casanova
7 public class ClassAccess extends AbstractSuffixExpression {
9 public static final int STATIC = 0;
10 public static final int NORMAL = 1;
12 public Expression prefix;
13 public Expression suffix;
16 public ClassAccess(Expression prefix,
19 super(prefix.sourceStart, suffix.sourceEnd);
25 public String toStringOperator() {
27 case STATIC : return "::"; //$NON-NLS-1$
28 case NORMAL : return "->"; //$NON-NLS-1$
30 return "unknown operator"; //$NON-NLS-1$
34 * Return the expression as String.
35 * @return the expression
37 public String toStringExpression() {
38 final StringBuffer buff = new StringBuffer();
39 buff.append(prefix.toStringExpression());
40 buff.append(toStringOperator());
41 buff.append(suffix.toStringExpression());
42 return buff.toString();