w.print("final java.util.ArrayList<HandlerRegistration> regs = ");
w.println("new java.util.ArrayList<HandlerRegistration>();");
for (JMethod method : handlersType_.getMethods())
{
Handler h = method.getAnnotation(Handler.class);
if (h == null)
continue;
if (!method.getReturnType().equals(JPrimitiveType.VOID))
logger_.log(TreeLogger.Type.WARN,
"Handler method (" + handlersType_.getQualifiedSourceName()
+ "." + method.getName() + ") has non-void return type "
+ method.getReturnType().getQualifiedSourceName());
if (method.getParameters().length != 0)
throw new IllegalArgumentException(
"Handler methods must not have arguments ("
+ method.getName() + ")");
String methodName = method.getName();
String commandName = h.value();
if (commandName == null || commandName.length() == 0)
{
if (methodName.length() < 3
|| !methodName.startsWith("on")
|| Character.isLowerCase(methodName.charAt(2)))