/** * Creates a deep clone of this {@link AInterfaceTypeIR} 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 AInterfaceTypeIR} node */ public AInterfaceTypeIR clone(Map<INode,INode> oldToNewMap) { AInterfaceTypeIR node = new AInterfaceTypeIR( _sourceNode, _tag, _metaData, _optional, cloneNode(_namedInvType, oldToNewMap), cloneList(_types, oldToNewMap), _name ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AInterfaceTypeIR} node. * @return a deep clone of this {@link AInterfaceTypeIR} node */ public AInterfaceTypeIR clone() { return new AInterfaceTypeIR( _sourceNode, _tag, _metaData, _optional, cloneNode(_namedInvType), cloneList(_types), _name ); }
public String format(AMethodTypeIR methodType) throws AnalysisException { final String OBJ = "Object"; if (funcValAssist == null) { return OBJ; } AInterfaceDeclIR methodTypeInterface = funcValAssist.findInterface(methodType); if (methodTypeInterface == null) { return OBJ; // Should not happen } AInterfaceTypeIR methodClass = new AInterfaceTypeIR(); methodClass.setName(methodTypeInterface.getName()); LinkedList<STypeIR> params = methodType.getParams(); for (STypeIR param : params) { methodClass.getTypes().add(param.clone()); } methodClass.getTypes().add(methodType.getResult().clone()); return methodClass != null ? format(methodClass) : OBJ; }
AInterfaceTypeIR classType = new AInterfaceTypeIR(); classType.setName(lambdaInterface.getName());