From 871409e060a2c28b237155d248a41efee31ff69d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 2 Apr 2011 05:24:35 +0000 Subject: [PATCH] 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 --- .../presents/dobj/AttributeChangedEvent.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/threerings/presents/dobj/AttributeChangedEvent.java b/src/main/java/com/threerings/presents/dobj/AttributeChangedEvent.java index fe096ea53..ce1c011f0 100644 --- a/src/main/java/com/threerings/presents/dobj/AttributeChangedEvent.java +++ b/src/main/java/com/threerings/presents/dobj/AttributeChangedEvent.java @@ -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. Do not construct these objects by hand. 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. Do not construct these objects by hand. 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) {