/** * Creates a new tree field only constructor {@code AVarDeclIR TAG=var} 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 final_ the {@link Boolean} node for the {@code final} child of this {@link AVarDeclIR} node * @param type_ the {@link STypeIR} node for the {@code type} child of this {@link AVarDeclIR} node * @param pattern_ the {@link SPatternIR} node for the {@code pattern} child of this {@link AVarDeclIR} node * @param exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AVarDeclIR} node */ public AVarDeclIR(Boolean final_, STypeIR type_, SPatternIR pattern_, SExpIR exp_) { super(null,null,null); this.setFinal(final_); this.setType(type_); this.setPattern(pattern_); this.setExp(exp_); }
/** * Creates a new complete constructor {@code AVarDeclIR} 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 final_ the {@link Boolean} node for the {@code final} child of this {@link AVarDeclIR} node * @param type_ the {@link STypeIR} node for the {@code type} child of this {@link AVarDeclIR} node * @param pattern_ the {@link SPatternIR} node for the {@code pattern} child of this {@link AVarDeclIR} node * @param exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AVarDeclIR} node */ public AVarDeclIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, Boolean final_, STypeIR type_, SPatternIR pattern_, SExpIR exp_) { super(sourceNode_,tag_,metaData_); this.setFinal(final_); this.setType(type_); this.setPattern(pattern_); this.setExp(exp_); }
public AVarDeclIR consLocalVarDecl(INode node, STypeIR type, SPatternIR pattern, SExpIR exp) { AVarDeclIR localVarDecl = new AVarDeclIR(); localVarDecl.setType(type); localVarDecl.setFinal(false); localVarDecl.setSourceNode(node != null ? new SourceNode(node) : null); localVarDecl.setPattern(pattern); localVarDecl.setExp(exp); return localVarDecl; }