Package org.jboss.forge.shell.command

Examples of org.jboss.forge.shell.command.CommandMetadata


public class DeprecatedObserver
{

   public void beforeCommandExecution(@Observes PreCommandExecution cmd, Shell shell)
   {
      CommandMetadata command = cmd.getCommand();
      boolean deprecated = command.getMethod().isAnnotationPresent(Deprecated.class);
      if (deprecated)
      {
         String message = String.format("The command (%s) is deprecated and may be removed in future versions",
                  command.getName());
         ShellMessages.warn(shell, message);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.shell.command.CommandMetadata

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.