From: kpouer Date: Sun, 10 Aug 2003 15:45:41 +0000 (+0000) Subject: this class will define a class instantiation (with maybe a &) X-Git-Url: http://secure.phpeclipse.com this class will define a class instantiation (with maybe a &) --- 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 index 0000000..aec08c9 --- /dev/null +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ClassInstantiation.java @@ -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(); + } +}