Class UndeclaredThrowableStrategy
java.lang.Object
org.springframework.cglib.core.DefaultGeneratorStrategy
org.springframework.cglib.transform.impl.UndeclaredThrowableStrategy
- All Implemented Interfaces:
GeneratorStrategy
A
GeneratorStrategy
suitable for use with org.springframework.cglib.Enhancer
which
causes all undeclared exceptions thrown from within a proxied method to be wrapped
in an alternative exception of your choice.-
Field Summary
Fields inherited from class org.springframework.cglib.core.DefaultGeneratorStrategy
INSTANCE
-
Constructor Summary
ConstructorDescriptionUndeclaredThrowableStrategy
(Class wrapper) Create a new instance of this strategy. -
Method Summary
Methods inherited from class org.springframework.cglib.core.DefaultGeneratorStrategy
generate, getClassVisitor, getClassWriter, transform
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.cglib.core.GeneratorStrategy
equals
-
Constructor Details
-
UndeclaredThrowableStrategy
Create a new instance of this strategy.- Parameters:
wrapper
- a class which extends either directly or indirectly fromThrowable
and which has at least one constructor that takes a single argument of typeThrowable
, for examplejava.lang.reflect.UndeclaredThrowableException.class
-
-
Method Details
-
transform
- Overrides:
transform
in classDefaultGeneratorStrategy
- Throws:
Exception
-