Is it possible to use the Scala @BeanProperty annotation to create only the setter?
Is it possible to use the Scala @BeanProperty annotation to create only the setter?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I know
@BeanPropertysynthesizes getter forvalfields and setter as well forvar. It is not possible to generate only setters, hence you must write the setter explicitly and do not use@BeanProperty:Note the
privatefield modifier. Without it thestatus()Scala-style getter will still be generated. For some reason it is generated as well withprivate var, but it’s private.