Represents an object allocation expression of the form new e or new e where e is the operand expression. @author David J. Pearce
| 4362 | * |
| 4363 | */ |
| 4364 | public static class New extends AbstractExpr implements LVal, UnaryOperator { |
| 4365 | |
| 4366 | public New(Type type, Expr operand) { |
| 4367 | super(EXPR_new, type, operand); |
| 4368 | } |
| 4369 | |
| 4370 | /** |
| 4371 | * Get the operand to be evaluated and stored in the heap. That is, |
| 4372 | * <code>e<code> in </code>new e</code>. |
| 4373 | */ |
| 4374 | @Override |
| 4375 | public Expr getOperand() { |
| 4376 | return (Expr) super.get(1); |
| 4377 | } |
| 4378 | |
| 4379 | @Override |
| 4380 | public Expr clone(Syntactic.Item[] operands) { |
| 4381 | return new New((Type) operands[0], (Expr) operands[1]); |
| 4382 | } |
| 4383 | |
| 4384 | @Override |
| 4385 | public String toString() { |
| 4386 | return "new " + getOperand(); |
| 4387 | } |
| 4388 | |
| 4389 | public static final Descriptor DESCRIPTOR_0 = new Descriptor(Operands.TWO, Data.ZERO, "EXPR_new") { |
| 4390 | @Override |
| 4391 | public Syntactic.Item construct(int opcode, Syntactic.Item[] operands, byte[] data) { |
| 4392 | return new New((Type) operands[0], (Expr) operands[1]); |
| 4393 | } |
| 4394 | }; |
| 4395 | } |
| 4396 | |
| 4397 | public static class LambdaAccess extends AbstractItem implements Expr, Bindable { |
| 4398 |
nothing calls this directly
no outgoing calls
no test coverage detected