org.knowhowlab.osgi.shell.equinox
Class EquinoxCommandProviderGenerator

java.lang.Object
  extended by org.knowhowlab.osgi.shell.equinox.EquinoxCommandProviderGenerator

public class EquinoxCommandProviderGenerator
extends Object

CommandProvider class generator. It uses AbstractEquinoxCommandProvider as super class and adds public methods for each command name and in method body redirects call to original commands service

Author:
dmytro.pishchukhin

Constructor Summary
EquinoxCommandProviderGenerator()
           
 
Method Summary
static void clean(String suffix)
          Detach generated class
static Object generate(Object service, String groupName, Map<String,String> commands, String suffix)
          Generate CommandProvider class and instance for this class based on parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EquinoxCommandProviderGenerator

public EquinoxCommandProviderGenerator()
Method Detail

generate

public static Object generate(Object service,
                              String groupName,
                              Map<String,String> commands,
                              String suffix)
                       throws Exception
Generate CommandProvider class and instance for this class based on parameters

Parameters:
service - commands service
groupName - group name
commands - commands map (name=help)
suffix - unique class suffix
Returns:
generated CommandProvider instance
Throws:
Exception - if something went wrong

clean

public static void clean(String suffix)
Detach generated class

Parameters:
suffix - unique class suffix


Copyright © 2015 Know-How Lab. All rights reserved.