/** * Creates a new complete constructor {@code AExternalExpIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param targetLangExp_ the {@link String} node for the {@code targetLangExp} child of this {@link AExternalExpIR} node */ public AExternalExpIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, STypeIR type_, String targetLangExp_) { super(sourceNode_,tag_,metaData_,type_); this.setTargetLangExp(targetLangExp_); }
/** * Creates a new tree field only constructor {@code AExternalExpIR TAG=external} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param targetLangExp_ the {@link String} node for the {@code targetLangExp} child of this {@link AExternalExpIR} node */ public AExternalExpIR(STypeIR type_, String targetLangExp_) { super(null,null,null,type_); this.setTargetLangExp(targetLangExp_); }
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; }
intValue.setTargetLangExp("" + n); intValue.setTargetLangExp("" + n);