org.h2.test.utils
Class ProxyCodeGenerator

java.lang.Object
  extended by org.h2.test.utils.ProxyCodeGenerator

public class ProxyCodeGenerator
extends java.lang.Object

A code generator for class proxies.


Constructor Summary
ProxyCodeGenerator()
           
 
Method Summary
static java.lang.String formatMethodCall(java.lang.reflect.Method m, java.lang.Object... args)
          Format a method call, including arguments, for an exception message.
static java.lang.Class<?> getClassProxy(java.lang.Class<?> c)
          Generate a proxy class.
static boolean isGenerated(java.lang.Class<?> c)
          Check whether there is already a proxy class generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyCodeGenerator

public ProxyCodeGenerator()
Method Detail

isGenerated

public static boolean isGenerated(java.lang.Class<?> c)
Check whether there is already a proxy class generated.

Parameters:
c - the class
Returns:
true if yes

getClassProxy

public static java.lang.Class<?> getClassProxy(java.lang.Class<?> c)
                                        throws java.lang.ClassNotFoundException
Generate a proxy class. The returned class extends the given class.

Parameters:
c - the class to extend
Returns:
the proxy class
Throws:
java.lang.ClassNotFoundException

formatMethodCall

public static java.lang.String formatMethodCall(java.lang.reflect.Method m,
                                                java.lang.Object... args)
Format a method call, including arguments, for an exception message.

Parameters:
m - the method
args - the arguments
Returns:
the formatted string