beans fix
This commit is contained in:
@@ -142,14 +142,27 @@ public class SpringContextScanner extends ASTVisitor {
|
||||
|
||||
private void collectAssignableTypes(ITypeBinding binding, Set<String> types) {
|
||||
if (binding == null) return;
|
||||
types.add(binding.getQualifiedName());
|
||||
types.add(binding.getErasure().getQualifiedName()); // Handles generics (e.g., List<String> -> List)
|
||||
|
||||
String qName = binding.getQualifiedName();
|
||||
if (qName != null && !qName.isEmpty()) {
|
||||
types.add(qName);
|
||||
}
|
||||
|
||||
ITypeBinding erasure = binding.getErasure();
|
||||
if (erasure != null) {
|
||||
String erasureName = erasure.getQualifiedName();
|
||||
if (erasureName != null && !erasureName.isEmpty()) {
|
||||
types.add(erasureName);
|
||||
}
|
||||
}
|
||||
|
||||
collectAssignableTypes(binding.getSuperclass(), types);
|
||||
if (binding.getInterfaces() != null) {
|
||||
for (ITypeBinding iface : binding.getInterfaces()) {
|
||||
collectAssignableTypes(iface, types);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Set<String> extractQualifiers(IBinding binding) {
|
||||
Set<String> qualifiers = new HashSet<>();
|
||||
|
||||
Reference in New Issue
Block a user