Interface Instrumenter
public interface Instrumenter
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]instrumentClass(String className, byte[] classfileBuffer, boolean verify) Instruments the appropriate methods of a class by adding a prologue that checks for entitlements.
-
Method Details
-
instrumentClass
Instruments the appropriate methods of a class by adding a prologue that checks for entitlements. The prologue:-
gets the
EntitlementCheckerinstance from theEntitlementCheckerHandleholder; - identifies the caller class and pushes it onto the stack;
- forwards the instrumented function parameters;
-
calls the
EntitlementCheckermethod corresponding to the method it is injected into (e.g.check$java_net_DatagramSocket$receiveforDatagramSocket.receive(java.net.DatagramPacket)).
- Parameters:
className- the name of the class to instrumentclassfileBuffer- its bytecodeverify- whether we should verify the bytecode before and after instrumentation- Returns:
- the instrumented class bytes
-
gets the
-