@HashCodeAndEqualsPlugin.Enhance public class MethodCallProxy extends Object implements AuxiliaryType
Callable.call() or Runnable.run() method is called where the method
 call proxy implements both interfaces.
 In order to do so, the method call proxy instances are constructed by providing all the necessary information for calling a particular method:
static, the first argument should be an instance on which the method is called.| Modifier and Type | Class and Description | 
|---|---|
| static class  | MethodCallProxy.AssignableSignatureCallA stack manipulation that creates a  MethodCallProxyfor a given method an pushes such an object onto the call stack. | 
| protected static class  | MethodCallProxy.ConstructorCallAn implementation for a constructor of a  MethodCallProxy. | 
| protected static class  | MethodCallProxy.MethodCallAn implementation for a method of a  MethodCallProxy. | 
| protected static class  | MethodCallProxy.PrecomputedMethodGraphA precomputed method graph that only displays the methods that are relevant for creating a method call proxy. | 
AuxiliaryType.NamingStrategy, AuxiliaryType.SignatureRelevantDEFAULT_TYPE_MODIFIER| Constructor and Description | 
|---|
| MethodCallProxy(Implementation.SpecialMethodInvocation specialMethodInvocation,
               boolean serializableProxy)Creates a new method call proxy for a given method and uses a default assigner for assigning the method's return
 value to either the  Callable.call()orRunnable.run()method returns. | 
| MethodCallProxy(Implementation.SpecialMethodInvocation specialMethodInvocation,
               boolean serializableProxy,
               Assigner assigner)Creates a new method call proxy for a given method. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getSuffix()Produces a suffix that gives this auxiliary type a stable name. | 
| DynamicType | make(String auxiliaryTypeName,
    ClassFileVersion classFileVersion,
    MethodAccessorFactory methodAccessorFactory)Creates a new auxiliary type. | 
public MethodCallProxy(Implementation.SpecialMethodInvocation specialMethodInvocation, boolean serializableProxy)
Callable.call() or Runnable.run() method returns.specialMethodInvocation - The special method invocation which should be invoked by this method call proxy.serializableProxy - Determines if the generated proxy should be serializableProxy.public MethodCallProxy(Implementation.SpecialMethodInvocation specialMethodInvocation, boolean serializableProxy, Assigner assigner)
specialMethodInvocation - The special method invocation which should be invoked by this method call proxy.serializableProxy - Determines if the generated proxy should be serializableProxy.assigner - An assigner for assigning the target method's return value to either the
                                Callable.call() or Runnable.run()} methods'
                                return values.public String getSuffix()
getSuffix in interface AuxiliaryTypepublic DynamicType make(String auxiliaryTypeName, ClassFileVersion classFileVersion, MethodAccessorFactory methodAccessorFactory)
make in interface AuxiliaryTypeauxiliaryTypeName - The fully qualified binary name for this auxiliary type. The type should be in
                              the same package than the instrumented type this auxiliary type is providing services
                              to in order to allow package-private access.classFileVersion - The class file version the auxiliary class should be written in.methodAccessorFactory - A factory for accessor methods.Copyright © 2014–2024. All rights reserved.