Description
Given the following test case,
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.MethodDescriptor;
import java.beans.PropertyDescriptor;
public class BeansTest {
public static void main(String[] args) throws Throwable
static void dumpBean(final Class cl) throws Throwable {
System.out.println("Introspecting: " + cl.getName());
BeanInfo beanInfo = Introspector.getBeanInfo(cl);
System.out.println(" Properties: ");
for (PropertyDescriptor p : beanInfo.getPropertyDescriptors())
System.out.println(" Methods: ");
for (MethodDescriptor m : beanInfo.getMethodDescriptors())
}
}
class Empty {
}
class Static {
public static String getName()
}
When this test case is run, the output from introspecting the Empty class is identical to that of the output from introspecting the Static class.
There is no information returned for getName(). If I remove the "static" keyword in the declaration of class Static, then introspection DOES return the "getName()" method.