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