/** * Creates a new tree field only constructor {@code ACallObjectExpStmIR TAG=callObjectExp} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ACallObjectExpStmIR} node * @param obj_ the {@link SExpIR} node for the {@code obj} child of this {@link ACallObjectExpStmIR} node * @param fieldName_ the {@link String} node for the {@code fieldName} child of this {@link ACallObjectExpStmIR} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link ACallObjectExpStmIR} node */ public ACallObjectExpStmIR(STypeIR type_, SExpIR obj_, String fieldName_, List<? extends SExpIR> args_) { super(null,null,null); this.setType(type_); this.setObj(obj_); this.setFieldName(fieldName_); this.setArgs(args_); }
/** * Creates a new complete constructor {@code ACallObjectExpStmIR} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ACallObjectExpStmIR} node * @param obj_ the {@link SExpIR} node for the {@code obj} child of this {@link ACallObjectExpStmIR} node * @param fieldName_ the {@link String} node for the {@code fieldName} child of this {@link ACallObjectExpStmIR} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link ACallObjectExpStmIR} node */ public ACallObjectExpStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, STypeIR type_, SExpIR obj_, String fieldName_, List<? extends SExpIR> args_) { super(sourceNode_,tag_,metaData_); this.setType(type_); this.setObj(obj_); this.setFieldName(fieldName_); this.setArgs(args_); }
public ACallObjectExpStmIR consInstanceCallStm(STypeIR instanceType, String instanceName, String memberName, SExpIR... args) { AIdentifierVarExpIR instance = new AIdentifierVarExpIR(); instance.setName(instanceName); instance.setType(instanceType.clone()); instance.setIsLocal(true); ACallObjectExpStmIR call = new ACallObjectExpStmIR(); call.setType(new AVoidTypeIR()); call.setFieldName(memberName); call.setObj(instance); for (SExpIR arg : args) { call.getArgs().add(arg); } return call; }
@Override public void caseACallObjectStmIR(ACallObjectStmIR node) throws AnalysisException { ACallObjectExpStmIR callObjExpStm = new ACallObjectExpStmIR(); callObjExpStm.setArgs(node.getArgs()); callObjExpStm.setObj(node.getDesignator().apply(converter)); callObjExpStm.setFieldName(node.getFieldName()); callObjExpStm.setSourceNode(node.getSourceNode()); callObjExpStm.setTag(node.getTag()); callObjExpStm.setType(node.getType()); if (node.parent() != null) { node.parent().replaceChild(node, callObjExpStm); } else { log.error("Could not find parent of " + node); } } }
callSentinel.setObj(sentinelVar); callSentinel.setFieldName(concPrefixes.stateChangedMethodName()); callSentinel.setType(new AVoidTypeIR());
jmlGen.getJavaGen().getJavaFormat().getValueSemantics().addCloneFreeNode(obj); setCall.setObj(obj); setCall.setSourceNode(node.getSourceNode());
paramExp.setObj(cast);