lombok-pg -

lombok
Annotation Type BoundSetter


@Target(value={FIELD,TYPE})
@Retention(value=SOURCE)
public @interface BoundSetter

Creates a "bound" setter for an annotated field.

Before:

 public class Mountain {
 
        @BoundSetter
        private String name;
 }
 
After:
 public class Mountain {
        public static final String PROP_NAME = "name";
 
        private String name;
 
        public void setName(String name) {
                String oldValue = this.name;
                this.name = name;
                getPropertySupport().firePropertyChange(PROP_NAME, oldValue, name);
        }
 }
 


Optional Element Summary
 boolean throwVetoException
           
 lombok.AccessLevel value
          If you want your setter to be non-public, you can specify an alternate access level here.
 boolean vetoable
          When true, it indicates that bound properties should be a constrained properties according to the JavaBeans spec and therefore subject to listeners vetoing the property change.
 

value

public abstract lombok.AccessLevel value
If you want your setter to be non-public, you can specify an alternate access level here.

Default:
lombok.AccessLevel.PUBLIC

vetoable

public abstract boolean vetoable
When true, it indicates that bound properties should be a constrained properties according to the JavaBeans spec and therefore subject to listeners vetoing the property change.

Default:
false

throwVetoException

public abstract boolean throwVetoException
Default:
false

lombok-pg -

Copyright © 2010-2011 Philipp Eichhorn, licensed under the MIT licence.