/** * Returns a deep clone of this {@link AProductType} node. * @return a deep clone of this {@link AProductType} node */ public AProductType clone() { return new AProductType( _location, _resolved, _definitions, _types ); }
/** * Creates a deep clone of this {@link AProductType} 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 AProductType} node */ public AProductType clone(Map<INode,INode> oldToNewMap) { AProductType node = new AProductType( _location, _resolved, _definitions, _types ); oldToNewMap.put(this, node); return node; }
public static AProductType newAProductType(ILexLocation location, List<PType> types) { AProductType result = new AProductType(); initType(result, location); result.setTypes(types); return result; }