String desc = (String) component.getAttributes().getValue("descriptor");
DefType defType = DefType.valueOf(((String) component.getAttributes().getValue("defType")).toUpperCase());
DefDescriptor<?> descriptor = Aura.getDefinitionService().getDefDescriptor(desc, defType.getPrimaryInterface());
Definition def = descriptor.getDef();
ReferenceTreeModel.assertAccess(def);
Map<DefType, List<DefModel>> depsMap = Maps.newEnumMap(DefType.class);
Set<DefDescriptor<?>> deps = Sets.newHashSet();
def.appendDependencies(deps);
for (DefDescriptor<?> dep : deps) {
if (ReferenceTreeModel.hasAccess(dep.getDef())) {
DefType type = dep.getDefType();