Please run:
import java.beans.BeanInfo;
import java.beans.BeanProperty;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
public class Test {
public static class C {
private double x;
@BeanProperty(
bound = true,
expert = true,
hidden = true,
preferred = true,
description = "TEST",
enumerationValues = {
"javax.swing.SwingConstants.EAST"}
)
public void setX(double d) { x = d; }
public double getX() { return x; }
}
public static void main(String[] args) throws Exception {
BeanInfo i = Introspector.getBeanInfo(C.class, Object.class);
PropertyDescriptor x = i.getPropertyDescriptors()[0];
System.out.println(x.getName() + ": " + x.getShortDescription());
System.out.println("bound: " + x.isBound());
System.out.println("expert: " + x.isExpert());
System.out.println("hidden: " + x.isHidden());
System.out.println("preferred: " + x.isPreferred());
}
}
Output (JDK9 b73, Ubuntu 14.04 Linux):
x: TEST
bound: false
expert: true
hidden: true
preferred: true