return SymbolReference.adapt(ref, com.github.javaparser.symbolsolver.model.declarations.TypeDeclaration.class);
}
}
}
}
<BUG>if (this.wrappedNode.getPackage() != null) {

String qName = this.wrappedNode.getPackage().getName().toString() + "." + name;
</BUG>
SymbolReference<com.github.javaparser.symbolsolver.model.declarations.ReferenceTypeDeclaration> ref = typeSolver.tryToSolveType(qName);

return SymbolReference.adapt(ref, com.github.javaparser.symbolsolver.model.declarations.TypeDeclaration.class);
}
}
} else if (importDecl instanceof TypeImportOnDemandDeclaration) {
String packageName = ((TypeImportOnDemandDeclaration) importDecl).getName().getId();
String qName = packageName + "." + name;
SymbolReference<com.github.javaparser.symbolsolver.model.declarations.ReferenceTypeDeclaration> ref = typeSolver.tryToSolveType(qName);
