public Object clone() throws CloneNotSupportedException { MethodSpecifier clone = (MethodSpecifier) super.clone(); clone.setCaller((DataInputVariable) getCaller().clone()); ValueSpecifier[] cloneParameters = new ValueSpecifier[parameters.length]; for (int i = 0; i < parameters.length; i++) { cloneParameters[i] = (ValueSpecifier) parameters[i].clone(); } clone.setParameters(cloneParameters); return clone; }
/* Implementing ValueSpecifier */ public ValueSpecifier cloneInContext(java.util.Map originalToCloneMap) throws CloneNotSupportedException { MethodSpecifier clone = (MethodSpecifier) super.clone(); clone.setCaller((DataInputVariable) getCaller().cloneInContext(originalToCloneMap)); ValueSpecifier[] cloneParameters = new ValueSpecifier[parameters.length]; for (int i = 0; i < parameters.length; i++) { cloneParameters[i] = parameters[i].cloneInContext(originalToCloneMap); } clone.setParameters(cloneParameters); return clone; }