MethodTrappublic final class MethodTrap extends Object Java API to support run-time method trapping from Java code.
It is used internally by J2ME software stack implementations
and should be placed in a hidden package.
MethodTrap class allows to change execution entry of Java methods. |
Fields Summary |
---|
public static final int | ACTION_CALLBACKInvoke callback function | public static final int | ACTION_EXITCauses JVM to stop | public static final int | ACTION_STOP_ISOLATECauses current isolate to stop | public static final int | ACTION_BREAKPOINTCauses native breakpoint to happen |
Methods Summary |
---|
public static native void | releaseTrap(int trapHandle)Release Java method that was previously trapped by setTrap() call.
| public static native int | setJavaTrap(java.lang.String methodName, java.lang.String handlerName)Replace the execution entry of the specified method with
the execution entry of another method with the similar signature.
| public static native int | setTrap(java.lang.String methodName, int callCount, int action, int targetTask)Trap specified Java method for JVM to take special action before
the method is invoked.
|
|