Added "Task Tags" functionality (TODO,...)
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / ClassInstantiation.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 /**
4  * a class instantiation.
5  * @author Matthieu Casanova
6  */
7 public final class ClassInstantiation extends PrefixedUnaryExpression {
8
9   private final boolean reference;
10
11   public ClassInstantiation(final Expression expression,
12                             final boolean reference,
13                             final int sourceStart) {
14     super(expression, OperatorIds.NEW, sourceStart);
15     this.reference = reference;
16   }
17
18   public String toStringExpression() {
19     if (!reference) {
20       return super.toStringExpression();
21     }
22     return '&' + super.toStringExpression();
23   }
24 }