protected abstract Expr clone(Map<Expr, Expr> cache);
@Override protected Expr clone(Map<Expr, Expr> cache) { InstanceOfExpr copy = new InstanceOfExpr(); copy.type = type; copy.expr = expr != null ? expr.clone() : null; return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { NewMultiArrayExpr copy = new NewMultiArrayExpr(); cache.put(this, copy); for (Expr dimension : dimensions) { copy.dimensions.add(dimension.clone(cache)); } copy.type = type; return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { CastExpr copy = new CastExpr(); copy.value = value.clone(cache); copy.target = target; return copy; } }
@Override protected UnwrapArrayExpr clone(Map<Expr, Expr> cache) { UnwrapArrayExpr copy = (UnwrapArrayExpr) cache.get(this); if (copy == null) { copy = new UnwrapArrayExpr(elementType); copy.array = array != null ? array.clone(cache) : null; cache.put(copy, copy); } return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { PrimitiveCastExpr copy = new PrimitiveCastExpr(); copy.value = value.clone(cache); copy.source = source; copy.target = target; return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } ConditionalExpr copy = new ConditionalExpr(); cache.put(this, copy); copy.setCondition(condition != null ? condition.clone(cache) : null); copy.setConsequent(consequent != null ? consequent.clone(cache) : null); copy.setAlternative(alternative != null ? alternative.clone(cache) : null); return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } SubscriptExpr copy = new SubscriptExpr(); copy.setArray(array != null ? array.clone(cache) : null); copy.setIndex(index != null ? index.clone(cache) : null); copy.setType(type); return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } InvocationExpr copy = new InvocationExpr(); cache.put(this, copy); copy.setMethod(method); for (Expr arg : arguments) { copy.getArguments().add(arg.clone(cache)); } return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } QualificationExpr copy = new QualificationExpr(); cache.put(this, copy); copy.setField(field); copy.setQualified(qualified != null ? qualified.clone(cache) : null); return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } NewArrayExpr copy = new NewArrayExpr(); cache.put(this, copy); copy.setType(type); copy.setLength(length != null ? length.clone() : null); return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } BinaryExpr copy = new BinaryExpr(); cache.put(this, copy); copy.setFirstOperand(firstOperand != null ? firstOperand.clone(cache) : null); copy.setSecondOperand(secondOperand != null ? secondOperand.clone(cache) : null); copy.setOperation(operation); copy.setType(type); return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } UnaryExpr copy = new UnaryExpr(); copy.setOperation(operation); copy.setOperand(operand != null ? operand.clone(cache) : null); copy.setType(type); return copy; } }
@Override protected UnwrapArrayExpr clone(Map<Expr, Expr> cache) { UnwrapArrayExpr copy = (UnwrapArrayExpr) cache.get(this); if (copy == null) { copy = new UnwrapArrayExpr(elementType); copy.array = array != null ? array.clone(cache) : null; cache.put(copy, copy); } return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { PrimitiveCastExpr copy = new PrimitiveCastExpr(); copy.value = value.clone(cache); copy.source = source; copy.target = target; return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { NewMultiArrayExpr copy = new NewMultiArrayExpr(); cache.put(this, copy); for (Expr dimension : dimensions) { copy.dimensions.add(dimension.clone(cache)); } copy.type = type; return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { InstanceOfExpr copy = new InstanceOfExpr(); copy.type = type; copy.expr = expr != null ? expr.clone() : null; return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { CastExpr copy = new CastExpr(); copy.value = value.clone(cache); copy.target = target; return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } NewArrayExpr copy = new NewArrayExpr(); cache.put(this, copy); copy.setType(type); copy.setLength(length != null ? length.clone() : null); return copy; } }
@Override protected Expr clone(Map<Expr, Expr> cache) { Expr known = cache.get(this); if (known != null) { return known; } BinaryExpr copy = new BinaryExpr(); cache.put(this, copy); copy.setFirstOperand(firstOperand != null ? firstOperand.clone(cache) : null); copy.setSecondOperand(secondOperand != null ? secondOperand.clone(cache) : null); copy.setOperation(operation); copy.setType(type); return copy; } }