if (debug)
logger.debug("FieldAccessModified.testOnePackage: " +
packageName + " classes " + classNames);
PrintWriter out = new PrintWriter(System.out);
final AnnotationTest test = new AnnotationTest(out, out);
final String classpath = System.getProperty("java.class.path");
final String jdoPropertiesFileName =
packageName.replace ('.', '/') + "/jdoTest.properties"; //NOI18N
final String[] args = new String[classNames.size() + 6];
int index = 0;
// init arguments for AnnotationTest.run call
// specify properties file
args[index++] = "--properties";
args[index++] = jdoPropertiesFileName;
// specify jdo path to find the properties file
args[index++] = "-j";
args[index++] = classpath;
// specify source path to find the classes
args[index++] = "-s";
args[index++] = classpath;
// add class names
for (java.util.Iterator i = classNames.iterator(); i.hasNext();) {
args[index++] = (String)i.next();
}
if (debug)
logger.debug ("Run AnnotationTest with args " + Arrays.asList(args));
int errors = test.run(args);
if (errors > 0) {
fail(ASSERTION_FAILED,
"AnnotationTest with args " + Arrays.asList(args) +
" results in " + errors + " errors.");
}