Keep our resources in src/main/resources per the standard project layout.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6251 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2010-11-08 17:31:33 +00:00
parent 07706ec61e
commit 7df0de5389
17 changed files with 3 additions and 2 deletions
@@ -0,0 +1,53 @@
package {{package}};
{{#imports}}
import {{this}};
{{/imports}}
/**
* Dispatches calls to a {@link {{name}}Receiver} instance.
*/
public class {{name}}Decoder extends InvocationDecoder
{
/** The generated hash code used to identify this receiver class. */
public static final String RECEIVER_CODE = "{{receiver_code}}";
{{#methods}}
/** The method id used to dispatch {@link {{name}}Receiver#{{method.name}}}
* notifications. */
public static final int {{code}} = {{-index}};
{{/methods}}
/**
* Creates a decoder that may be registered to dispatch invocation
* service notifications to the specified receiver.
*/
public {{name}}Decoder ({{name}}Receiver receiver)
{
this.receiver = receiver;
}
@Override
public String getReceiverCode ()
{
return RECEIVER_CODE;
}
@Override
public void dispatchNotification (int methodId, Object[] args)
{
switch (methodId) {
{{#methods}}
case {{code}}:
(({{name}}Receiver)receiver).{{method.name}}(
{{getUnwrappedArgListAsListeners}}
);
return;
{{/methods}}
default:
super.dispatchNotification(methodId, args);
return;
}
}
}