use of sun.reflect.generics.tree.TypeTree in project jdk8u_jdk by JetBrains.
the class ClassRepository method getSuperInterfaces.
public Type[] getSuperInterfaces() {
Type[] superInterfaces = this.superInterfaces;
if (superInterfaces == null) {
// lazily initialize super interfaces
// first, extract super interface subtree(s) from AST
TypeTree[] ts = getTree().getSuperInterfaces();
// create array to store reified subtree(s)
superInterfaces = new Type[ts.length];
// reify all subtrees
for (int i = 0; i < ts.length; i++) {
// obtain visitor
Reifier r = getReifier();
// reify subtree
ts[i].accept(r);
// extract result from visitor and store it
superInterfaces[i] = r.getResult();
}
this.superInterfaces = superInterfaces;
}
// return cached result
return superInterfaces.clone();
}