String childType = element.getKey();
if (validChildType != null && !validChildType.equals(childType)) {
continue;
}
final ImmutableManagementResourceRegistration childRegistration = registry.getSubModel(PathAddress.pathAddress(element));
final AliasEntry aliasEntry = childRegistration.getAliasEntry();
Set<String> set = result.get(childType);
if (set == null) {
set = new LinkedHashSet<String>();
result.put(childType, set);
}
if (aliasEntry == null) {
if (resource.hasChildren(childType)) {
set.addAll(resource.getChildrenNames(childType));
}
} else {
//PathAddress target = aliasEntry.getTargetAddress();
PathAddress target = aliasEntry.convertToTargetAddress(addr.append(element));
PathAddress targetParent = target.subAddress(0, target.size() - 1);
Resource parentResource = context.readResourceFromRoot(targetParent);
if (parentResource.hasChildren(target.getLastElement().getKey())) {
set.add(element.getValue());
}