The zero arg ctor must be public, and I'm making the other ctor public because

it's totally wacky to have the ctor you shouldn't use, be public, and the one
you should, not.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6588 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2011-04-02 05:24:35 +00:00
parent 17dc26fe52
commit 871409e060
@@ -34,6 +34,31 @@ import com.samskivert.util.StringUtil;
*/
public class AttributeChangedEvent extends NamedEvent
{
/**
* Constructs a new attribute changed event on the specified target object with the supplied
* attribute name and value. <em>Do not construct these objects by hand.</em> Use {@link
* DObject#changeAttribute} instead.
*
* @param targetOid the object id of the object whose attribute has changed.
* @param name the name of the attribute (data member) that has changed.
* @param value the new value of the attribute (in the case of primitive types, the
* reflection-defined object-alternative is used).
*/
public AttributeChangedEvent (int targetOid, String name, Object value, Object oldValue)
{
super(targetOid, name);
_value = value;
_oldValue = oldValue;
}
/** For unserialization. */
public AttributeChangedEvent ()
{
super(0, null);
// we can't allow our primary ctor to be called during unserialization, or it will wipe out
// the hackery we do with _oldValue
}
/**
* Returns the new value of the attribute.
*/
@@ -140,31 +165,6 @@ public class AttributeChangedEvent extends NamedEvent
return true;
}
/**
* Constructs a new attribute changed event on the specified target object with the supplied
* attribute name and value. <em>Do not construct these objects by hand.</em> Use {@link
* DObject#changeAttribute} instead.
*
* @param targetOid the object id of the object whose attribute has changed.
* @param name the name of the attribute (data member) that has changed.
* @param value the new value of the attribute (in the case of primitive types, the
* reflection-defined object-alternative is used).
*/
protected AttributeChangedEvent (int targetOid, String name, Object value, Object oldValue)
{
super(targetOid, name);
_value = value;
_oldValue = oldValue;
}
/** For unserialization. */
protected AttributeChangedEvent ()
{
super(0, null);
// we can't allow our primary ctor to be called during unserialization, or it will wipe out
// the hackery we do with _oldValue
}
@Override
protected void notifyListener (Object listener)
{