this class will define a class instantiation (with maybe a &)
authorkpouer <kpouer>
Sun, 10 Aug 2003 15:45:41 +0000 (15:45 +0000)
committerkpouer <kpouer>
Sun, 10 Aug 2003 15:45:41 +0000 (15:45 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java [new file with mode: 0644]

diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java
new file mode 100644 (file)
index 0000000..aec08c9
--- /dev/null
@@ -0,0 +1,24 @@
+package net.sourceforge.phpdt.internal.compiler.ast;
+
+/**
+ * a class instantiation.
+ * @author Matthieu Casanova
+ */
+public class ClassInstantiation extends PrefixedUnaryExpression {
+
+  private boolean reference;
+
+  public ClassInstantiation(final Expression expression,
+                            final boolean reference,
+                            final int sourceStart) {
+    super(expression, OperatorIds.NEW, sourceStart);
+    this.reference = reference;
+  }
+
+  public String toStringExpression() {
+    if (!reference) {
+      return super.toStringExpression();
+    }
+    return "&"+super.toStringExpression();
+  }
+}