Class MBeanStaticProxyGenerator

java.lang.Object
org.jppf.utils.generator.MBeanStaticProxyGenerator

public class MBeanStaticProxyGenerator extends Object
This class generates the code of a static proxy for one or more specified MBean interfaces using Java reflection.
Author:
Laurent Cohen
  • Constructor Details

    • MBeanStaticProxyGenerator

      public MBeanStaticProxyGenerator()
  • Method Details

    • generateSource

      public String generateSource(String className, String mbeanName, String interfaceName, String targetPackage) throws Exception
      Generate the static proxy source code for the specified interface.
      Parameters:
      className - the name of the generated class.
      mbeanName - the object name of the MBean.
      interfaceName - the name of the MBean interface for which to generate the proxy code.
      targetPackage - the name of the package in which the class is generated.
      Returns:
      the genenrated source code.
      Throws:
      Exception - if any error occurs.
    • generateSource

      public String generateSource(String className, String mbeanName, Class<?> inf, String targetPackage) throws Exception
      Generate the static proxy source code for the specified interface.
      Parameters:
      className - the name of the generated class.
      mbeanName - the object name of the MBean.
      inf - the MBean interface for which to generate the proxy code.
      targetPackage - the name of the package in which the class is generated.
      Returns:
      the geenrated source code.
      Throws:
      Exception - if any error occurs.
    • main

      public static void main(String[] args)
      Parameters:
      args - not used.