X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassAccess.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassAccess.java deleted file mode 100644 index 384d192..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassAccess.java +++ /dev/null @@ -1,97 +0,0 @@ -package net.sourceforge.phpdt.internal.compiler.ast; - -import java.util.List; -import java.util.ArrayList; - -/** - * Any class access. - * @author Matthieu Casanova - */ -public class ClassAccess extends AbstractVariable { - - /** a static class access : "::" */ - public static final int STATIC = 0; - - /** a normal class access : "->" */ - public static final int NORMAL = 1; - - public Expression prefix; - - /** the suffix. */ - public Expression suffix; - - /** the type of access. */ - public int type; - - /** - * Create a new class access. - * @param prefix - * @param suffix - * @param type the type of access {@link #STATIC} or {@link #NORMAL} - */ - public ClassAccess(final Expression prefix, - final Expression suffix, - final int type) { - super(prefix.sourceStart, suffix.sourceEnd); - this.prefix = prefix; - this.suffix = suffix; - this.type = type; - } - - public String toStringOperator() { - switch (type) { - case STATIC : return "::"; //$NON-NLS-1$ - case NORMAL : return "->"; //$NON-NLS-1$ - } - return "unknown operator"; //$NON-NLS-1$ - } - - /** - * Return the expression as String. - * @return the expression - */ - public String toStringExpression() { - final StringBuffer buff = new StringBuffer(); - buff.append(prefix.toStringExpression()); - buff.append(toStringOperator()); - buff.append(suffix.toStringExpression()); - return buff.toString(); - } - - /** - * todo: find a better way to handle this - * @return - */ - public String getName() { - if (prefix instanceof AbstractVariable) { - return ((AbstractVariable)prefix).getName(); - } - return prefix.toStringExpression(); - } - - /** - * Get the variables from outside (parameters, globals ...) - * @return the variables from outside - */ - public List getOutsideVariable() { - return new ArrayList(1); - } - - /** - * get the modified variables. - * @return the variables from we change value - */ - public List getModifiedVariable() { - return new ArrayList(1); - } - - /** - * Get the variables used. - * @return the variables used - */ - public List getUsedVariable() { - final List list = prefix.getUsedVariable(); - list.addAll(suffix.getUsedVariable()); - return list; - } -}