Package org.rstudio.core.client.command

Examples of org.rstudio.core.client.command.Handler


         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)))
View Full Code Here

TOP

Related Classes of org.rstudio.core.client.command.Handler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.