/** * Returns a deep clone of this {@link AMkBasicExp} node. * @return a deep clone of this {@link AMkBasicExp} node */ public AMkBasicExp clone() { return new AMkBasicExp( _type, _location, cloneNode(_arg) ); }
/** * Creates a deep clone of this {@link AMkBasicExp} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AMkBasicExp} node */ public AMkBasicExp clone(Map<INode,INode> oldToNewMap) { AMkBasicExp node = new AMkBasicExp( _type, _location, cloneNode(_arg, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
public static AMkBasicExp newAMkBasicExp(SBasicType type, PExp arg) { AMkBasicExp result = new AMkBasicExp(); initExpression(result, type.getLocation()); result.setType(type); result.setArg(arg); return result; }