org.springframework.util
Class ReflectionUtils

java.lang.Object
  extended by org.springframework.util.ReflectionUtils

public abstract class ReflectionUtils
extends Object

Simple utility class for handling reflection exceptions. Only intended for internal use.

Since:
1.2.2
Author:
Juergen Hoeller

Constructor Summary
ReflectionUtils()
           
 
Method Summary
static void handleInvocationTargetException(InvocationTargetException ex)
          Handle the given invocation target exception.
static void handleReflectionException(Exception ex)
          Handle the given reflection exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

handleReflectionException

public static void handleReflectionException(Exception ex)
Handle the given reflection exception. Should only be called if no checked exception is expected to be thrown by the target method.

Throws the underlying RuntimeException or Error in case of an InvocationTargetException with such a root cause. Throws an IllegalStateException with an appropriate message else.

Parameters:
ex - the reflection exception to handle

handleInvocationTargetException

public static void handleInvocationTargetException(InvocationTargetException ex)
Handle the given invocation target exception. Should only be called if no checked exception is expected to be thrown by the target method.

Throws the underlying RuntimeException or Error in case of such a root cause. Throws an IllegalStateException else.

Parameters:
ex - the invocation target exception to handle


Copyright (c) 2002-2006 The Spring Framework Project.