@HashCodeAndEqualsPlugin.Enhance 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.RebasedMethodInvocation
A
Implementation.SpecialMethodInvocation which invokes a rebased method
as given by a MethodRebaseResolver . |
Implementation.Target.AbstractBase.DefaultMethodInvocation
Implementation.Target.AbstractBase
defaultMethodInvocation, instrumentedType, methodGraph
Modifier | Constructor and Description |
---|---|
protected |
RebaseImplementationTarget(TypeDescription instrumentedType,
MethodGraph.Linked methodGraph,
Implementation.Target.AbstractBase.DefaultMethodInvocation defaultMethodInvocation,
Map<MethodDescription.SignatureToken,MethodRebaseResolver.Resolution> rebaseableMethods)
Creates a rebase implementation target.
|
Modifier and Type | Method and Description |
---|---|
TypeDescription |
getOriginType()
Identifies the origin type of an implementation.
|
Implementation.SpecialMethodInvocation |
invokeSuper(MethodDescription.SignatureToken token)
Creates a special method invocation for invoking the super method of the given method.
|
protected static Implementation.Target |
of(TypeDescription instrumentedType,
MethodGraph.Linked methodGraph,
ClassFileVersion classFileVersion,
MethodRebaseResolver methodRebaseResolver)
Creates a new rebase implementation target.
|
getInstrumentedType, invokeDefault, invokeDefault, invokeDominant
protected RebaseImplementationTarget(TypeDescription instrumentedType, MethodGraph.Linked methodGraph, Implementation.Target.AbstractBase.DefaultMethodInvocation defaultMethodInvocation, Map<MethodDescription.SignatureToken,MethodRebaseResolver.Resolution> rebaseableMethods)
instrumentedType
- The instrumented type.methodGraph
- A method graph of the instrumented type.defaultMethodInvocation
- The default method invocation mode to apply.rebaseableMethods
- A mapping of the instrumented type's declared methods by each method's token.protected static Implementation.Target of(TypeDescription instrumentedType, MethodGraph.Linked methodGraph, ClassFileVersion classFileVersion, MethodRebaseResolver methodRebaseResolver)
instrumentedType
- The instrumented type.methodGraph
- A method graph of the instrumented type.classFileVersion
- The type's class file version.methodRebaseResolver
- A method rebase resolver to be used when calling a rebased method.public Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token)
token
- A token of the method that is to be invoked as a super method.public TypeDescription getOriginType()
Copyright © 2014–2025. All rights reserved.