/** * Returns a deep clone of this {@link AFunctionType} node. * @return a deep clone of this {@link AFunctionType} node */ public AFunctionType clone() { return new AFunctionType( _location, _resolved, _definitions, _partial, _parameters, _result, _instantiated ); }
/** * Creates a deep clone of this {@link AFunctionType} 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 AFunctionType} node */ public AFunctionType clone(Map<INode,INode> oldToNewMap) { AFunctionType node = new AFunctionType( _location, _resolved, _definitions, _partial, _parameters, _result, _instantiated ); oldToNewMap.put(this, node); return node; }
public static AFunctionType newAFunctionType(ILexLocation location, boolean partial, List<PType> parameters, PType resultType) { AFunctionType result = new AFunctionType(); initType(result, location); result.setParameters(parameters); result.setResult(resultType); result.setPartial(partial); result.setInstantiated(null); return result; }