args=methodCall.getArgs();
switch (methodCall.getMethodId())
{
case MethodDeclarations.putDataMethodLocal_id:
return new Modification(Modification.PUT_DATA,
(Fqn)args[1], // fqn
(Map)args[2]); // data
case MethodDeclarations.putDataEraseMethodLocal_id:
return new Modification(Modification.PUT_DATA_ERASE,
(Fqn)args[1], // fqn
(Map)args[2]); // data
case MethodDeclarations.putKeyValMethodLocal_id:
return new Modification(Modification.PUT_KEY_VALUE,
(Fqn)args[1], // fqn
args[2], // key
args[3]); // value
case MethodDeclarations.removeNodeMethodLocal_id:
return new Modification(Modification.REMOVE_NODE,
(Fqn)args[1]); // fqn
case MethodDeclarations.removeKeyMethodLocal_id:
return new Modification(Modification.REMOVE_KEY_VALUE,
(Fqn)args[1], // fqn
args[2]); // key
case MethodDeclarations.removeDataMethodLocal_id:
return new Modification(Modification.REMOVE_DATA,
(Fqn)args[1]); // fqn
default :
throw new Exception("method call " + method.getName() + " cannot be converted to a modification");
}
}