use of com.sun.tools.javac.model.JavacTypes in project ceylon-compiler by ceylon.
the class TestSymtabItems method run.
void run() throws Exception {
Context c = new Context();
JavacFileManager.preRegister(c);
Symtab syms = Symtab.instance(c);
JavacTypes types = JavacTypes.instance(c);
// will init ClassReader.sourceCompleter
JavaCompiler.instance(c);
for (Field f : Symtab.class.getDeclaredFields()) {
// during API evolution
if (f.getName().toLowerCase().contains("methodhandle"))
continue;
Class<?> ft = f.getType();
if (TypeMirror.class.isAssignableFrom(ft))
print(f.getName(), (TypeMirror) f.get(syms), types);
else if (Element.class.isAssignableFrom(ft))
print(f.getName(), (Element) f.get(syms));
}
if (errors > 0)
throw new Exception(errors + " errors occurred");
}
Aggregations