private void setup(String packageName, String className, File resourceBundle,
File targetLocation, Class interfaceClass) throws IOException {
ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(
packageName, className);
factory.makeInterface();
factory.setJavaDocCommentForClass(javaDocComment(resourceBundle.getCanonicalPath().replace(
File.separatorChar, '/')));
factory.addImplementedInterface(interfaceClass.getName());
FileOutputStream file = new FileOutputStream(targetLocation);
Writer underlying = new OutputStreamWriter(file, Util.DEFAULT_ENCODING);