/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { int n = getOperanda().getNumberOfOperands(); List<LocalVariableReference> refs2 = new ArrayList<LocalVariableReference>(n); for (int i = 0; i < n; i++) { refs2.add ((LocalVariableReference) getSlot(i).copy(rebindings)); } TupleExpression t2 = new TupleExpression(); ExpressionTool.copyLocationInfo(this, t2); t2.setVariables(refs2); return t2; }
/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { int n = getOperanda().getNumberOfOperands(); List<LocalVariableReference> refs2 = new ArrayList<LocalVariableReference>(n); for (int i = 0; i < n; i++) { refs2.add ((LocalVariableReference) getSlot(i).copy(rebindings)); } TupleExpression t2 = new TupleExpression(); ExpressionTool.copyLocationInfo(this, t2); t2.setVariables(refs2); return t2; }
Expression ioe = new InstanceOfExpression(var, types.get(i).get(0)); for (int j = 1; j < types.get(i).size(); j++) { ioe = new OrExpression(ioe, new InstanceOfExpression(var.copy(new RebindingMap()), types.get(i).get(j)));
Expression ioe = new InstanceOfExpression(var, types.get(i).get(0)); for (int j = 1; j < types.get(i).size(); j++) { ioe = new OrExpression(ioe, new InstanceOfExpression(var.copy(new RebindingMap()), types.get(i).get(j)));