GeneratorStrategypublic class UndeclaredThrowableStrategy extends DefaultGeneratorStrategy
GeneratorStrategy suitable for use with net.sf.cglib.Enhancer which
causes all undeclared exceptions thrown from within a proxied method to be wrapped
in an alternative exception of your choice.INSTANCE| Constructor | Description |
|---|---|
UndeclaredThrowableStrategy(Class wrapper) |
Create a new instance of this strategy.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected ClassGenerator |
transform(ClassGenerator cg) |
generate, getClassVisitor, getClassWriter, transformequalspublic UndeclaredThrowableStrategy(Class wrapper)
wrapper - a class which extends either directly or
indirectly from Throwable and which has at least one
constructor that takes a single argument of type
Throwable, for example
java.lang.reflect.UndeclaredThrowableException.classprotected ClassGenerator transform(ClassGenerator cg) throws Exception
transform in class DefaultGeneratorStrategyExceptionCopyright © 2018. All rights reserved.