public class RebaseImplementationTarget extends Implementation.Target.AbstractBase
Super method calls are merely emulated by this
Implementation.Target
in order
to preserve Java's super call semantics a user would expect when invoking a super
-prefixed method. This
means that original methods are either moved to renamed private
methods which are never dispatched
virtually or they are invoked directly via the INVOKESPECIAL
invocation to explicitly forbid a virtual
dispatch.Modifier and Type | Class and Description |
---|---|
static class |
RebaseImplementationTarget.Factory
A factory for creating a
RebaseImplementationTarget . |
protected static class |
RebaseImplementationTarget.RebasedMethodSpecialMethodInvocation
A
Implementation.SpecialMethodInvocation which invokes a rebased method
as given by a MethodRebaseResolver . |
Implementation.Target.AbstractBase, Implementation.Target.MethodLookup
Modifier and Type | Field and Description |
---|---|
protected MethodRebaseResolver |
methodRebaseResolver
A method rebase resolver to be used when calling a rebased method.
|
bridgeMethodResolver, defaultMethods, invokableMethods, typeDescription
Modifier | Constructor and Description |
---|---|
protected |
RebaseImplementationTarget(MethodLookupEngine.Finding finding,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
MethodRebaseResolver methodRebaseResolver)
Creates a rebase implementation target.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
TypeDescription |
getOriginType()
Identifies the origin type of an implementation.
|
int |
hashCode() |
protected Implementation.SpecialMethodInvocation |
invokeSuper(MethodDescription methodDescription)
Invokes the fully resolved method to be invoked by a super method call.
|
String |
toString() |
getTypeDescription, invokeDefault, invokeSuper
protected final MethodRebaseResolver methodRebaseResolver
protected RebaseImplementationTarget(MethodLookupEngine.Finding finding, BridgeMethodResolver.Factory bridgeMethodResolverFactory, MethodRebaseResolver methodRebaseResolver)
finding
- The lookup of the instrumented type this instance should represent.bridgeMethodResolverFactory
- A factory for creating a bridge method resolver.methodRebaseResolver
- A method rebase resolver to be used when calling a rebased method.protected Implementation.SpecialMethodInvocation invokeSuper(MethodDescription methodDescription)
Implementation.Target.AbstractBase
invokeSuper
in class Implementation.Target.AbstractBase
methodDescription
- The method that is to be invoked specially.public TypeDescription getOriginType()
Implementation.Target
public boolean equals(Object other)
equals
in class Implementation.Target.AbstractBase
public int hashCode()
hashCode
in class Implementation.Target.AbstractBase
Copyright © 2014–2015. All rights reserved.