Class BuiltinProfilingService.DefaultMethodEnhancer
java.lang.Object
org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultMethodEnhancer
- All Implemented Interfaces:
MethodEnhancer
- Enclosing class:
- BuiltinProfilingService
private final class BuiltinProfilingService.DefaultMethodEnhancer
extends Object
implements MethodEnhancer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenhance(String id, DynamicMethod delegate) Will be called with a method which should be enhanced.
-
Constructor Details
-
DefaultMethodEnhancer
private DefaultMethodEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:MethodEnhancerWill be called with a method which should be enhanced. e.g. with information or callback invocations required by the profiling. In most cases you don't want to profile all methods, just the methods of your own code. So you can add a simple filter hereif( isMyCode( delegate ) ) { return new ProfilingDynamicMethod( delegate ); } else { return delegate; }- Specified by:
enhancein interfaceMethodEnhancer- Parameters:
id- the name of the given delegatedelegate- the method to enhance- Returns:
- the enhanced method. if nothing is to be done, the delegate itself can be returned
-