use of sun.tools.java.ClassDeclaration in project jdk8u_jdk by JetBrains.
the class Main method compileAllClasses.
/*
* Compile all classes that need to be compiled.
*/
public void compileAllClasses(BatchEnvironment env) throws ClassNotFound, IOException, InterruptedException {
ByteArrayOutputStream buf = new ByteArrayOutputStream(4096);
boolean done;
do {
done = true;
for (Enumeration<?> e = env.getClasses(); e.hasMoreElements(); ) {
ClassDeclaration c = (ClassDeclaration) e.nextElement();
done = compileClass(c, buf, env);
}
} while (!done);
}
use of sun.tools.java.ClassDeclaration in project jdk8u_jdk by JetBrains.
the class CFCTest method exerciseClassDefinition.
/**
* Failure is seen when getClassDefinition causes class read
*/
void exerciseClassDefinition() throws Exception {
BatchEnvironment env = new BatchEnvironment(System.out, BatchEnvironment.createClassPath(testClassPath, null, null), null);
try {
ClassDeclaration decl = env.getClassDeclaration(Identifier.lookup(testClassName));
decl.getClassDefinition(env);
} finally {
env.flushErrors();
env.shutdown();
}
}
Aggregations