I have written source code transformation using inria-spoon library. I have the following function in my transformer (which makes sure that my "process" function is invoked only for desired classes):
public boolean isToBeProcessed(CtInterface<?> ctClass) {
return isProcessible(ctClass);
}
So only desired classes are transformed. But it seems that all the classes are copied from source directory to target directory. I expect only the transformed classes to be copied to target directory.
Is there some configuration OR handling for this in inria-spoon?
Currently I am invoking my transformer via JUnit test case, using following function:
public void testTransform()
{
final String[] arguments = { "-i", "E:/input",
"-o", "E:/output", "-p",
"com.transformer.ClassTransformer",
"-c"};
final Launcher launcher = new Launcher();
launcher.setArgs(arguments);
launcher.run();
}