com.damnhandy.aspects.bean
Class PropertyChangeAspect

java.lang.Object
  extended by com.damnhandy.aspects.bean.PropertyChangeAspect

public class PropertyChangeAspect
extends java.lang.Object

This aspect listens for property changes on classes marked with the Observable annotation. By default, all properties of an advised class are bound unless marked with the NotBound annotation.

Author:
Ryan J. McDonough

Constructor Summary
PropertyChangeAspect()
           
 
Method Summary
 java.lang.Object fieldChangeAdvice(org.jboss.aop.joinpoint.FieldInvocation invocation)
          Advice that manages the firing of property change event on advised classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyChangeAspect

public PropertyChangeAspect()
Method Detail

fieldChangeAdvice

public java.lang.Object fieldChangeAdvice(org.jboss.aop.joinpoint.FieldInvocation invocation)
                                   throws java.lang.Throwable
Advice that manages the firing of property change event on advised classes. When the value of a bound property in an advised class change, this method will fire a property change event if before an after values are different. If the field has been annotated with the NotBound annotation, an event will not be fired. TODO: Constrained properties should be handled by another advice method.

Parameters:
invocation - the field invocation
Returns:
the result of the orginal method invocation
Throws:
java.lang.Throwable


Copyright © 2005 Ryan J. McDonough All Rights Reserved.