List of usage examples for org.eclipse.jdt.core ITypeHierarchy getExtendingInterfaces
IType[] getExtendingInterfaces(IType type);
From source file:edu.brown.cs.bubbles.bedrock.BedrockUtil.java
License:Open Source License
/********************************************************************************/ static void outputTypeHierarchy(ITypeHierarchy th, IvyXmlWriter xw) { xw.begin("HIERARCHY"); IType[] typs = th.getAllTypes();/* w w w .ja v a 2 s.c om*/ for (IType typ : typs) { xw.begin("TYPE"); try { xw.field("NAME", typ.getFullyQualifiedName()); xw.field("QNAME", typ.getTypeQualifiedName()); xw.field("PNAME", typ.getFullyQualifiedParameterizedName()); if (typ.isClass()) xw.field("KIND", "CLASS"); else if (typ.isEnum()) xw.field("KIND", "ENUM"); else if (typ.isInterface()) xw.field("KIND", "INTERFACE"); xw.field("LOCAL", typ.isLocal()); xw.field("MEMBER", typ.isMember()); xw.field("KEY", typ.getKey()); IType[] subs = th.getAllSubtypes(typ); for (IType styp : subs) { xw.begin("SUBTYPE"); xw.field("NAME", styp.getFullyQualifiedName()); xw.field("KEY", styp.getKey()); xw.end("SUBTYPE"); } IType[] sups = th.getAllSuperclasses(typ); for (IType styp : sups) { xw.begin("SUPERCLASS"); xw.field("NAME", styp.getFullyQualifiedName()); xw.field("KEY", styp.getKey()); xw.end("SUPERCLASS"); } sups = th.getAllSuperInterfaces(typ); for (IType styp : sups) { xw.begin("SUPERIFACE"); xw.field("NAME", styp.getFullyQualifiedName()); xw.field("KEY", styp.getKey()); xw.end("SUPERIFACE"); } sups = th.getAllSupertypes(typ); for (IType styp : sups) { xw.begin("SUPERTYPE"); xw.field("NAME", styp.getFullyQualifiedName()); xw.field("KEY", styp.getKey()); xw.end("SUPERTYPE"); } sups = th.getExtendingInterfaces(typ); for (IType styp : sups) { xw.begin("EXTENDIFACE"); xw.field("NAME", styp.getFullyQualifiedName()); xw.field("KEY", styp.getKey()); xw.end("EXTENDIFACE"); } sups = th.getImplementingClasses(typ); for (IType styp : sups) { xw.begin("IMPLEMENTOR"); xw.field("NAME", styp.getFullyQualifiedName()); xw.field("KEY", styp.getKey()); xw.end("IMPLEMENTOR"); } } catch (JavaModelException e) { } xw.end("TYPE"); } xw.end("HIERARCHY"); }