Class UndeclaredThrowableStrategy

java.lang.Object
org.springframework.cglib.core.DefaultGeneratorStrategy
org.springframework.cglib.transform.impl.UndeclaredThrowableStrategy
All Implemented Interfaces:
GeneratorStrategy

public class UndeclaredThrowableStrategy extends DefaultGeneratorStrategy
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.
  • Constructor Details

    • UndeclaredThrowableStrategy

      public UndeclaredThrowableStrategy(Class wrapper)
      Create a new instance of this strategy.
      Parameters:
      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.class
  • Method Details