From 0f8fd31f83bc1257938d7bddfc458baeec216339 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 23 Oct 2010 19:38:17 +0000 Subject: [PATCH] Regenerated the test bits with the gen tasks. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6233 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../presents/client/TestDecoder.java | 2 +- .../presents/data/TestMarshaller.java | 6 ++++- .../threerings/presents/data/TestObject.java | 24 +++++++++++++++---- .../presents/server/TestDispatcher.java | 9 ++++--- .../presents/server/TestProvider.java | 6 ++++- .../presents/server/TestSender.java | 2 +- 6 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/test/java/com/threerings/presents/client/TestDecoder.java b/src/test/java/com/threerings/presents/client/TestDecoder.java index 6c63338e0..c450d84da 100644 --- a/src/test/java/com/threerings/presents/client/TestDecoder.java +++ b/src/test/java/com/threerings/presents/client/TestDecoder.java @@ -3,7 +3,7 @@ // // Narya library - tools for developing networked games // Copyright (C) 2002-2010 Three Rings Design, Inc., All Rights Reserved -// http://www.threerings.net/code/narya/ +// http://code.google.com/p/narya/ // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published diff --git a/src/test/java/com/threerings/presents/data/TestMarshaller.java b/src/test/java/com/threerings/presents/data/TestMarshaller.java index f0fdd6ef8..6abe8d07c 100644 --- a/src/test/java/com/threerings/presents/data/TestMarshaller.java +++ b/src/test/java/com/threerings/presents/data/TestMarshaller.java @@ -3,7 +3,7 @@ // // Narya library - tools for developing networked games // Copyright (C) 2002-2010 Three Rings Design, Inc., All Rights Reserved -// http://www.threerings.net/code/narya/ +// http://code.google.com/p/narya/ // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published @@ -21,6 +21,8 @@ package com.threerings.presents.data; +import javax.annotation.Generated; + import com.threerings.presents.client.Client; import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.TestService; @@ -34,6 +36,8 @@ import java.util.List; * interfaces that marshall the response arguments and deliver them back * to the requesting client. */ +@Generated(value={"com.threerings.presents.tools.GenServiceTask"}, + comments="Derived from TestService.java.") public class TestMarshaller extends InvocationMarshaller implements TestService { diff --git a/src/test/java/com/threerings/presents/data/TestObject.java b/src/test/java/com/threerings/presents/data/TestObject.java index b038e40b2..1641b1853 100644 --- a/src/test/java/com/threerings/presents/data/TestObject.java +++ b/src/test/java/com/threerings/presents/data/TestObject.java @@ -22,6 +22,7 @@ package com.threerings.presents.data; import java.util.ArrayList; +import javax.annotation.Generated; import com.threerings.presents.dobj.DObject; import com.threerings.presents.dobj.OidList; @@ -33,21 +34,27 @@ public class TestObject extends DObject { // AUTO-GENERATED: FIELDS START /** The field name of the foo field. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public static final String FOO = "foo"; /** The field name of the bar field. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public static final String BAR = "bar"; /** The field name of the ints field. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public static final String INTS = "ints"; /** The field name of the strings field. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public static final String STRINGS = "strings"; /** The field name of the list field. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public static final String LIST = "list"; /** The field name of the longs field. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public static final String LONGS = "longs"; // AUTO-GENERATED: FIELDS END @@ -72,6 +79,7 @@ public class TestObject extends DObject * clients) will apply the value change when they received the * attribute changed notification. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void setFoo (int value) { int ovalue = this.foo; @@ -88,6 +96,7 @@ public class TestObject extends DObject * clients) will apply the value change when they received the * attribute changed notification. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void setBar (String value) { String ovalue = this.bar; @@ -104,12 +113,13 @@ public class TestObject extends DObject * clients) will apply the value change when they received the * attribute changed notification. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void setInts (int[] value) { int[] ovalue = this.ints; requestAttributeChange( INTS, value, ovalue); - this.ints = (value == null) ? null : (int[])value.clone(); + this.ints = (value == null) ? null : value.clone(); } /** @@ -121,6 +131,7 @@ public class TestObject extends DObject * will apply the value change when they received the attribute * changed notification. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void setIntsAt (int value, int index) { int ovalue = this.ints[index]; @@ -137,12 +148,13 @@ public class TestObject extends DObject * clients) will apply the value change when they received the * attribute changed notification. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void setStrings (String[] value) { String[] ovalue = this.strings; requestAttributeChange( STRINGS, value, ovalue); - this.strings = (value == null) ? null : (String[])value.clone(); + this.strings = (value == null) ? null : value.clone(); } /** @@ -154,6 +166,7 @@ public class TestObject extends DObject * will apply the value change when they received the attribute * changed notification. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void setStringsAt (String value, int index) { String ovalue = this.strings[index]; @@ -167,6 +180,7 @@ public class TestObject extends DObject * oid list. The list will not change until the event is actually * propagated through the system. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void addToList (int oid) { requestOidAdd(LIST, oid); @@ -177,6 +191,7 @@ public class TestObject extends DObject * list oid list. The list will not change until the * event is actually propagated through the system. */ + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void removeFromList (int oid) { requestOidRemove(LIST, oid); @@ -190,9 +205,10 @@ public class TestObject extends DObject * clients) will apply the value change when they received the * attribute changed notification. */ - public void setLongs (ArrayList value) + @Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) + public void setLongs (ArrayList value) { - ArrayList ovalue = this.longs; + ArrayList ovalue = this.longs; requestAttributeChange( LONGS, value, ovalue); this.longs = value; diff --git a/src/test/java/com/threerings/presents/server/TestDispatcher.java b/src/test/java/com/threerings/presents/server/TestDispatcher.java index ac6e1f06b..927137f55 100644 --- a/src/test/java/com/threerings/presents/server/TestDispatcher.java +++ b/src/test/java/com/threerings/presents/server/TestDispatcher.java @@ -3,7 +3,7 @@ // // Narya library - tools for developing networked games // Copyright (C) 2002-2010 Three Rings Design, Inc., All Rights Reserved -// http://www.threerings.net/code/narya/ +// http://code.google.com/p/narya/ // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published @@ -21,6 +21,8 @@ package com.threerings.presents.server; +import javax.annotation.Generated; + import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.TestService; import com.threerings.presents.data.ClientObject; @@ -30,6 +32,8 @@ import java.util.List; /** * Dispatches requests to the {@link TestProvider}. */ +@Generated(value={"com.threerings.presents.tools.GenServiceTask"}, + comments="Derived from TestService.java.") public class TestDispatcher extends InvocationDispatcher { /** @@ -66,9 +70,8 @@ public class TestDispatcher extends InvocationDispatcher return; case TestMarshaller.TEST: - @SuppressWarnings("unchecked") List list = (List)args[2]; ((TestProvider)provider).test( - source, (String)args[0], ((Integer)args[1]).intValue(), list, (TestService.TestFuncListener)args[3] + source, (String)args[0], ((Integer)args[1]).intValue(), this.>cast(args[2]), (TestService.TestFuncListener)args[3] ); return; diff --git a/src/test/java/com/threerings/presents/server/TestProvider.java b/src/test/java/com/threerings/presents/server/TestProvider.java index d9bb3377c..ef078b017 100644 --- a/src/test/java/com/threerings/presents/server/TestProvider.java +++ b/src/test/java/com/threerings/presents/server/TestProvider.java @@ -3,7 +3,7 @@ // // Narya library - tools for developing networked games // Copyright (C) 2002-2010 Three Rings Design, Inc., All Rights Reserved -// http://www.threerings.net/code/narya/ +// http://code.google.com/p/narya/ // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published @@ -21,6 +21,8 @@ package com.threerings.presents.server; +import javax.annotation.Generated; + import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.TestService; import com.threerings.presents.data.ClientObject; @@ -29,6 +31,8 @@ import java.util.List; /** * Defines the server-side of the {@link TestService}. */ +@Generated(value={"com.threerings.presents.tools.GenServiceTask"}, + comments="Derived from TestService.java.") public interface TestProvider extends InvocationProvider { /** diff --git a/src/test/java/com/threerings/presents/server/TestSender.java b/src/test/java/com/threerings/presents/server/TestSender.java index e81a2833e..6fba9769b 100644 --- a/src/test/java/com/threerings/presents/server/TestSender.java +++ b/src/test/java/com/threerings/presents/server/TestSender.java @@ -3,7 +3,7 @@ // // Narya library - tools for developing networked games // Copyright (C) 2002-2010 Three Rings Design, Inc., All Rights Reserved -// http://www.threerings.net/code/narya/ +// http://code.google.com/p/narya/ // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published