public interface BridgeMethodResolver
Foo#qux on some type Bar with an overriden method qux that was
defined with a more specific return type would call the bridge method internally and not the intended method.
This can be problematic if the following chain is the result of an instrumentation:
super method accessor is registered for Foo#qux for some auxiliary type Baz.Bar#qux with the more specific return type.Bar#qux is intercepted by an instrumentation.Baz is used to invoke Foo#qux.super method invocation hits the bridge which delegates to the intercepted implementation what
results in endless recursion.| Modifier and Type | Interface and Description |
|---|---|
static interface |
BridgeMethodResolver.Factory
A factory for creating a
BridgeMethodResolver for a given list of
relevant methods that can be called in a given context. |
static class |
BridgeMethodResolver.NoOp
A no-op implementation of a
BridgeMethodResolver which is simply
returning the method it is given to resolve. |
static class |
BridgeMethodResolver.Simple
A simple bridge method resolver which applies its resolution by analyzing non-generic types.
|
| Modifier and Type | Method and Description |
|---|---|
MethodDescription |
resolve(MethodDescription methodDescription)
Resolves a method which is potentially a bridge method.
|
MethodDescription resolve(MethodDescription methodDescription)
methodDescription - The method to resolve in cases it is a bridge method.Copyright © 2014–2015. All rights reserved.