Removed vestigal business.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2811 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-09-24 21:39:42 +00:00
parent 320f53913b
commit 44f2a352cc
2 changed files with 1 additions and 70 deletions
@@ -1,5 +1,5 @@
//
// $Id: SpeakProvider.java,v 1.16 2003/09/11 16:36:39 mdb Exp $
// $Id: SpeakProvider.java,v 1.17 2003/09/24 21:39:42 mdb Exp $
package com.threerings.crowd.chat.server;
@@ -399,9 +399,6 @@ public class SpeakProvider
/** Recent chat history for the server. */
protected static HashMap _histories = new HashMap();
/** Maintains a mapping of listener identifiers. */
protected static HashMap _identers = new HashMap();
/** Used to note the recipients of a chat message. */
protected static MessageMapper _messageMapper = new MessageMapper();
@@ -1,66 +0,0 @@
//
// $Id: DEventUtil.java,v 1.4 2002/02/02 09:42:36 mdb Exp $
package com.threerings.presents.dobj;
import java.lang.reflect.Method;
import java.util.HashMap;
/**
* A repository for distributed object event related utility functions.
*/
public class DEventUtil
{
/**
* Looks up and returns the method used to set an attribute of the
* specified name on an instance of the specified distributed object
* class.
*/
public static Method getSetter (Class clazz, String name)
throws ObjectAccessException
{
// first see if it's cached
Method setter = (Method)_setterCache.get(name);
if (setter != null) {
return setter;
}
// convert the attribute name into a setter name
String sname = setterName(name);
try {
// look up that method (we don't have the parameter types, so
// we have to do our own name matching)
Method[] methods = clazz.getMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(sname)) {
setter = methods[i];
break;
}
}
} catch (SecurityException se) {
throw new ObjectAccessException("Reflection error", se);
}
// make sure we found a matching method
if (setter == null) {
String errmsg = "No setter for attribute '" + name + "'.";
throw new ObjectAccessException(errmsg);
}
// and cache it
_setterCache.put(name, setter);
return setter;
}
protected static String setterName (String name)
{
StringBuffer sname = new StringBuffer();
sname.append("set");
sname.append(Character.toUpperCase(name.charAt(0)));
sname.append(name.substring(1));
return sname.toString();
}
protected static HashMap _setterCache = new HashMap();
}