jep-256

How to use new BeanInfo Annotations in Java 9

喜夏-厌秋 提交于 2019-12-12 04:32:56
问题 JEP 256: BeanInfo Annotations provides for JavaBean and BeanProperty annotations. While there is not much documentation, I have been hoping this would allow us to use annotations to designate fields on a class as being JavaBean-style properties without having to create boilerplate getter/setter accessor/mutator methods. So this: public class Person { private String name ; public String getName( ) { return this.name ; } public void setName( String nameArg ) { this.name = nameArg ; } } …would