/** * Returns a deep clone of this {@link AExternalExpIR} node. * @return a deep clone of this {@link AExternalExpIR} node */ public AExternalExpIR clone() { return new AExternalExpIR( _sourceNode, _tag, _metaData, cloneNode(_type), _targetLangExp ); }
/** * Creates a deep clone of this {@link AExternalExpIR} 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 AExternalExpIR} node */ public AExternalExpIR clone(Map<INode,INode> oldToNewMap) { AExternalExpIR node = new AExternalExpIR( _sourceNode, _tag, _metaData, cloneNode(_type, oldToNewMap), _targetLangExp ); oldToNewMap.put(this, node); return node; }
private AExternalExpIR consZero() { AExternalExpIR zero = new AExternalExpIR(); zero.setType(consFieldType()); zero.setTargetLangExp("0"); return zero; } }
public AMethodDeclIR genHashcodeMethod(ARecordDeclIR record) throws AnalysisException { AMethodDeclIR hashcodeMethod = consHashcodeMethodSignature(); AReturnStmIR returnStm = new AReturnStmIR(); if (record.getFields().isEmpty()) { AExternalExpIR zero = new AExternalExpIR(); zero.setType(hashcodeMethod.getMethodType().getResult().clone()); zero.setTargetLangExp("0"); returnStm.setExp(zero); } else { returnStm.setExp(javaFormat.getJavaFormatAssistant().consUtilCallUsingRecFields(record, hashcodeMethod.getMethodType().getResult(), hashcodeMethod.getName())); } hashcodeMethod.setBody(returnStm); return hashcodeMethod; }
AExternalExpIR intValue = new AExternalExpIR(); intValue.setType(new AIntNumericBasicTypeIR()); intValue.setTargetLangExp("" + n); AExternalExpIR intValue = new AExternalExpIR(); intValue.setType(new AIntNumericBasicTypeIR()); intValue.setTargetLangExp("" + n);