public class RecoverAnnotationRecoveryHandler<T> extends Object implements MethodInvocationRecoverer<T>
@Recover annotation. A
suitable recovery method is one with a Throwable type as the first parameter and the
same return type and arguments as the method that failed. The Throwable first argument
is optional and if omitted the method is treated as a default (called when there are no
other matches). Generally the best matching method is chosen based on the type of the
first parameter and the type of the exception being handled. The closest match in the
class hierarchy is chosen, so for instance if an IllegalArgumentException is being
handled and there is a method whose first argument is RuntimeException, then it will be
preferred over a method whose first argument is Throwable.
|Constructor and Description
Copyright © 2014 SpringSource. All rights reserved.