+++ /dev/null
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * This is a cast expression.
- * @author Matthieu Casanova
- */
-public class CastExpression extends Expression {
-
- /** The type in which we cast the expression. */
- public ConstantIdentifier type;
-
- /** The expression to be casted. */
- public Expression expression;
-
- /**
- * Create a cast expression.
- * @param type the type
- * @param expression the expression
- * @param sourceStart starting offset
- * @param sourceEnd ending offset
- */
- public CastExpression(final ConstantIdentifier type,
- final Expression expression,
- final int sourceStart,
- final int sourceEnd) {
- super(sourceStart, sourceEnd);
- this.type = type;
- this.expression = expression;
- }
-
- /**
- * Return the expression as String.
- * @return the expression
- */
- public String toStringExpression() {
- final StringBuffer buff = new StringBuffer("(");
- buff.append(type.toStringExpression());
- buff.append(") ");
- buff.append(expression.toStringExpression());
- return buff.toString();
- }
-
- /**
- * Get the variables from outside (parameters, globals ...)
- * @return the variables from outside
- */
- public List getOutsideVariable() {
- return new ArrayList();
- }
-
- /**
- * get the modified variables.
- * @return the variables from we change value
- */
- public List getModifiedVariable() {
- return expression.getModifiedVariable();
- }
-
- /**
- * Get the variables used.
- * @return the variables used
- */
- public List getUsedVariable() {
- return expression.getUsedVariable();
- }
-}