private CsmClassifier findOtherClassifier(CsmClassifier out) {
CsmNamespace ns = BaseUtilitiesProviderImpl.getImpl()._getClassNamespace(out);
CsmClassifier cls = null;
if (ns != null) {
CsmUID<?> uid = UIDs.get(out);
CharSequence fqn = out.getQualifiedName();
Collection<CsmOffsetableDeclaration> col;
if (ns instanceof NamespaceImpl) {
col = ((NamespaceImpl)ns).getDeclarationsRange(fqn,
new Kind[]{Kind.CLASS, Kind.UNION, Kind.STRUCT, Kind.ENUM, Kind.TYPEDEF, Kind.TYPEALIAS,
Kind.TEMPLATE_DECLARATION, Kind.TEMPLATE_SPECIALIZATION,
Kind.CLASS_FORWARD_DECLARATION, Kind.ENUM_FORWARD_DECLARATION});
} else {
col = ns.getDeclarations();
}
for (CsmDeclaration decl : col) {
if (CsmKindUtilities.isClassifier(decl) && decl.getQualifiedName().equals(fqn)) {
if (!UIDs.get(decl).equals(uid)) {
cls = (CsmClassifier)decl;
if (!ForwardClass.isForwardClass(cls)) {
break;
}
}
}
}
}
return cls;
}