public static MethodDelegation toMethodReturnOf ( String name , MethodGraph . Compiler methodGraphCompiler ) { return withDefaultConfiguration ( ) . toMethodReturnOf ( name , methodGraphCompiler ) ; }
Delegates any intercepted method to invoke a method on an instance that is returned by a parameterless method of the given name . To be considered a valid delegation target a method must be visible and accessible to the instrumented type . This is the case if the method s declaring type is either public or in the same package as the instrumented type and if the method is either public or non - private and in the same package as the instrumented type . Private methods can only be used as a delegation target if the delegation is targeting the instrumented type .