/** * Creates a new tree field only constructor {@code APlainCallStmIR TAG=plain} 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 classType_ the {@link STypeIR} node for the {@code classType} child of this {@link APlainCallStmIR} node */ public APlainCallStmIR(STypeIR type_, Boolean isStatic_, String name_, List<? extends SExpIR> args_, STypeIR classType_) { super(null,null,null,type_,isStatic_,name_,args_); this.setClassType(classType_); }
/** * Creates a new complete constructor {@code APlainCallStmIR} 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 classType_ the {@link STypeIR} node for the {@code classType} child of this {@link APlainCallStmIR} node */ public APlainCallStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, STypeIR type_, Boolean isStatic_, String name_, List<? extends SExpIR> args_, STypeIR classType_) { super(sourceNode_,tag_,metaData_,type_,isStatic_,name_,args_); this.setClassType(classType_); }
@Override public void caseAPlainCallStmIR(APlainCallStmIR node) throws AnalysisException { String initName = getInitName(node); if (initName == null) { // No 'initName' exists for non-constructor calls return; } APlainCallStmIR callStm = new APlainCallStmIR(); callStm.setType(new AVoidTypeIR()); callStm.setClassType(null); callStm.setName(initName); for (SExpIR a : node.getArgs()) { callStm.getArgs().add(a.clone()); } assist.replaceNodeWith(node, callStm); }
public APlainCallStmIR consCallStm(AFieldDeclIR field) { APlainCallStmIR call = new APlainCallStmIR(); AExternalTypeIR classType = new AExternalTypeIR(); classType.setName(JavaFormat.UTILS_FILE); AIdentifierVarExpIR argument = new AIdentifierVarExpIR(); argument.setType(field.getType().clone()); argument.setIsLocal(false); argument.setName(field.getName()); call.setType(classType.clone()); call.setName("hashcode"); call.setClassType(classType.clone()); call.getArgs().add(argument); return call; }
private SStmIR buildTestExecutionStms(AIdentifierVarExpIR nodeVar, String traceEnclosingClassName) { AExternalTypeIR utilsType = new AExternalTypeIR(); utilsType.setName(tracePrefixes.traceNodeNodeClassName()); APlainCallStmIR executeTestsCall = new APlainCallStmIR(); executeTestsCall.setClassType(utilsType); executeTestsCall.setName(tracePrefixes.executeTestsMethodName()); executeTestsCall.setType(new AVoidTypeIR()); ATypeArgExpIR typeArg = new ATypeArgExpIR(); typeArg.setType(transAssistant.consClassType(traceEnclosingClassName)); executeTestsCall.getArgs().add(nodeVar.clone()); if (Settings.dialect != Dialect.VDM_SL) { executeTestsCall.getArgs().add(typeArg); } executeTestsCall.getArgs().add(transAssistant.getInfo().getExpAssistant().consIdVar(tracePrefixes.traceMethodParamName(), transAssistant.consClassType(tracePrefixes.testAccumulatorClassName()))); executeTestsCall.getArgs().add(transAssistant.getInfo().getExpAssistant().consIdVar(tracePrefixes.storeVarName(), transAssistant.consClassType(tracePrefixes.storeClassName()))); return executeTestsCall; }
call.setClassType(delegateType); call.setIsStatic(m.getStatic()); call.setName(m.getName());
initCall.setClassType(null); initCall.setName(initName);
callStm.setIsStatic(isStaticOrSl); callStm.setName(name); callStm.setClassType(classType); callStm.setArgs(argsCg);
call.setClassType(definingClass); call.setName(opName); call.setIsStatic(false);
sentinel.setName(concPrefixes.sentinelInstanceName()); entering.setClassType(sentinel); entering.setType(new AVoidTypeIR()); leaving.setClassType(sentinel.clone()); leaving.setType(new AVoidTypeIR()); leaving.getArgs().add(field.clone());