edu.rice.cs.plt.reflect
Class ReflectException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by edu.rice.cs.plt.reflect.ReflectException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ReflectException.ClassCastReflectException, ReflectException.ClassNotFoundReflectException, ReflectException.IllegalAccessReflectException, ReflectException.IllegalArgumentReflectException, ReflectException.InstantiationReflectException, ReflectException.InvocationTargetReflectException, ReflectException.NoSuchFieldReflectException, ReflectException.NoSuchMethodReflectException, ReflectException.NullPointerReflectException, ReflectException.SecurityReflectException

public abstract class ReflectException
extends Exception

An exception wrapper to simplify interactions with reflection libraries. Most documented exceptions (but not errors) thrown by reflection methods may be wrapped by a subclass of ReflectException. The wrapped exception may be caught and handled directly, or unwrapped with a ReflectExceptionVisitor.

Like most of the exceptions it wraps, ReflectException is a checked exception.

See Also:
Serialized Form

Nested Class Summary
static class ReflectException.ClassCastReflectException
          Wraps a ClassCastException
static class ReflectException.ClassNotFoundReflectException
          Wraps a ClassNotFoundException
static class ReflectException.IllegalAccessReflectException
          Wraps an IllegalAccessException
static class ReflectException.IllegalArgumentReflectException
          Wraps an IllegalArgumentException
static class ReflectException.InstantiationReflectException
          Wraps an InstantiationException
static class ReflectException.InvocationTargetReflectException
          Wraps an InvocationTargetException
static class ReflectException.NoSuchFieldReflectException
          Wraps a NoSuchFieldException
static class ReflectException.NoSuchMethodReflectException
          Wraps a NoSuchMethodException
static class ReflectException.NullPointerReflectException
          Wraps a NullPointerException
static class ReflectException.SecurityReflectException
          Wraps an SecurityException
 
Constructor Summary
protected ReflectException(Throwable cause)
           
 
Method Summary
abstract
<T> T
apply(ReflectExceptionVisitor<T> v)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReflectException

protected ReflectException(Throwable cause)
Method Detail

apply

public abstract <T> T apply(ReflectExceptionVisitor<T> v)