/** * Creates a new tree field only constructor {@code ANewObjectDesignatorIR TAG=new} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param exp_ the {@link ANewExpIR} node for the {@code exp} child of this {@link ANewObjectDesignatorIR} node */ public ANewObjectDesignatorIR(ANewExpIR exp_) { super(null,null,null); this.setExp(exp_); }
/** * Creates a new complete constructor {@code ANewObjectDesignatorIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param exp_ the {@link ANewExpIR} node for the {@code exp} child of this {@link ANewObjectDesignatorIR} node */ public ANewObjectDesignatorIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, ANewExpIR exp_) { super(sourceNode_,tag_,metaData_); this.setExp(exp_); }
@Override public SObjectDesignatorIR caseANewObjectDesignator( ANewObjectDesignator node, IRInfo question) throws AnalysisException { ANewExp exp = node.getExpression(); SExpIR expCg = exp.apply(question.getExpVisitor(), question); ANewObjectDesignatorIR newObjDesignator = new ANewObjectDesignatorIR(); if (!(expCg instanceof ANewExpIR)) { question.addUnsupportedNode(node, "Expected expression of new object designator to be a 'new expression' but got: " + expCg.getClass().getName()); return null; } newObjDesignator.setExp((ANewExpIR) expCg); return newObjDesignator; }