Package org.jppf.utils.generator
Class MBeanStaticProxyGenerator
java.lang.Object
org.jppf.utils.generator.MBeanStaticProxyGenerator
This class generates the code of a static proxy for one or more specified MBean interfaces using Java reflection.
- Author:
- Laurent Cohen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateSource(String className, String mbeanName, Class<?> inf, String targetPackage) Generate the static proxy source code for the specified interface.generateSource(String className, String mbeanName, String interfaceName, String targetPackage) Generate the static proxy source code for the specified interface.static void
-
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
- Parameters:
args- not used.
-