Set<String> hiddenPackages = new HashSet<String>();
Set<String> crisp = new HashSet<String>();
List<String> options = List.of("-XDdev");
// options = options.prepend("-doe");
// options = options.prepend("-verbose");
JavacTaskImpl task = (JavacTaskImpl)
tool.getTask(null, fm, null, options, null, null);
com.sun.tools.javac.main.JavaCompiler compiler =
com.sun.tools.javac.main.JavaCompiler.instance(task.getContext());
ClassWriter writer = ClassWriter.instance(task.getContext());
Symtab syms = Symtab.instance(task.getContext());
Names names = Names.instance(task.getContext());
Attribute.Compound proprietaryAnno =
new Attribute.Compound(syms.proprietaryType,
List.<Pair<Symbol.MethodSymbol,Attribute>>nil());
Attribute.Compound[] profileAnnos = new Attribute.Compound[profiles.getProfileCount() + 1];
Symbol.MethodSymbol profileValue = (MethodSymbol) syms.profileType.tsym.members().lookup(names.value).sym;
for (int i = 1; i < profileAnnos.length; i++) {
profileAnnos[i] = new Attribute.Compound(syms.profileType,
List.<Pair<Symbol.MethodSymbol, Attribute>>of(
new Pair<Symbol.MethodSymbol, Attribute>(profileValue, new Attribute.Constant(syms.intType, i))));
}
Type.moreInfo = true;
Types types = Types.instance(task.getContext());
Pool pool = new Pool(types);
for (JavaFileObject file : fm.list(jarLocation, "", EnumSet.of(CLASS), true)) {
String className = fm.inferBinaryName(jarLocation, file);
int index = className.lastIndexOf('.');
String pckName = index == -1 ? "" : className.substring(0, index);