Handle parameterized types in invocation services and receivers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6232 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -49,4 +49,13 @@ public abstract class InvocationDispatcher<T extends InvocationMarshaller>
|
||||
log.warning("Requested to dispatch unknown method", "provider", provider,
|
||||
"sourceOid", source.getOid(), "methodId", methodId, "args", args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs type casts in a way that works for parameterized types as well as simple types.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T> T cast (Object value)
|
||||
{
|
||||
return (T)value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user