Top Description Constructors Methods
org.codehaus.commons.compiler.util.reflect

public final Class ApiLog

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationHandler, .InvocationTargetException, .Method, .Proxy, java.util.Arrays, .HashSet, .Set, org.codehaus.commons.nullanalysis.NotNullByDefault

Simple logging of method invocations.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static Class<?>[]
getAllInterfaces(final Class<?> c)

private static void
getAllInterfaces(Class<?> c, Set<Class<?>> result)

public static Object
logMethodInvocations(final Object delegate)

Creates and returns an object that implements all interfaces that the delegate implements.

protected static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ApiLogback to summary
private ApiLog()

Method Detail

getAllInterfacesback to summary
private static Class<?>[] getAllInterfaces(final Class<?> c)
getAllInterfacesback to summary
private static void getAllInterfaces(Class<?> c, Set<Class<?>> result)
logMethodInvocationsback to summary
public static Object logMethodInvocations(final Object delegate)

Creates and returns an object that implements all interfaces that the delegate implements. All method invocations are forwarded to the delegate, and, after the delegate's method returns, logged to System.err.

truncateback to summary
protected static String truncate(String s)