java.beans.Introspector getBeanInfo 不获取任何超级接口的属性

Ste*_*Kuo 5 java reflection javabeans

我只是注意到 java.beans.Introspector getBeanInfo 没有获取任何超级接口的属性。例子:

public interface Person {
    String getName();
}
public interface Employee extends Person {
    int getSalary();
}
Run Code Online (Sandbox Code Playgroud)

尽管 name 是从 Person 继承的,但对 Employee 的内省只会产生薪水。

为什么是这样?我宁愿不必使用反射来获取所有吸气剂。