/** * Creates a deep clone of this {@link ANewExp} 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 ANewExp} node */ public ANewExp clone(Map<INode,INode> oldToNewMap) { ANewExp node = new ANewExp( _type, _location, cloneNode(_className, oldToNewMap), cloneList(_args, oldToNewMap), _classdef, _ctorDefinition ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link ANewExp} node. * @return a deep clone of this {@link ANewExp} node */ public ANewExp clone() { return new ANewExp( _type, _location, cloneNode(_className), cloneList(_args), _classdef, _ctorDefinition ); }
public static ANewExp newANewExp(ILexLocation start, ILexIdentifierToken classname, List<PExp> args) { ANewExp result = new ANewExp(); initExpression(result, start); result.setClassName(classname); result.setArgs(args); classname.getLocation().executable(true); return result; }