1 25 package ch.ethz.inf.iks.jvmai.jvmdi; 26 import java.util.Map ; 27 import java.util.HashMap ; 28 import java.util.List ; 29 import java.util.Iterator ; 30 31 import java.lang.reflect.Field ; 33 import java.lang.reflect.Method ; 34 import java.lang.reflect.Modifier ; 35 36 import java.net.URL ; 37 import java.io.InputStream ; 38 import java.io.IOException ; 39 40 import ch.ethz.jvmai.JoinPointHook; 41 import ch.ethz.jvmai.JoinPoint; 42 import ch.ethz.jvmai.MethodEntryJoinPoint; 43 import ch.ethz.jvmai.MethodExitJoinPoint; 44 import ch.ethz.jvmai.FieldAccessJoinPoint; 45 import ch.ethz.jvmai.FieldModificationJoinPoint; 46 import ch.ethz.jvmai.ExceptionJoinPoint; 47 import ch.ethz.jvmai.ExceptionCatchJoinPoint; 48 import ch.ethz.jvmai.JVMAspectInterface; 49 import ch.ethz.jvmai.WatchAlreadySetException; 50 import ch.ethz.jvmai.WatchNotSetException; 51 import ch.ethz.jvmai.NotInitializedException; 52 import ch.ethz.jvmai.CannotSetWatchException; 53 54 import org.apache.bcel.generic.Instruction; 55 import org.apache.bcel.generic.InstructionHandle; 56 import org.apache.bcel.generic.InstructionList; 57 import org.apache.bcel.generic.ReturnInstruction; 58 import org.apache.bcel.classfile.ClassParser; 59 import org.apache.bcel.classfile.JavaClass; 60 61 94 public 95 class AspectInterfaceImpl implements JVMAspectInterface 96 { 97 static 99 { 100 Class x=java.lang.RuntimeException .class; 101 try 102 { 103 System.loadLibrary("prosevm"); 105 } 106 catch (java.lang.UnsatisfiedLinkError notInstalled) 107 { 108 109 try 111 { 112 System.load(System.getProperty("ch.ethz.inf.project.home") + 113 System.getProperty("file.separator","/") + 114 "lib" + 115 System.getProperty("file.separator","/") + 116 System.getProperty("os.arch") + 117 System.getProperty("file.separator","/") + 118 System.mapLibraryName("prosevm")); 119 } 120 catch (java.lang.UnsatisfiedLinkError notInProjectLib) 121 { 122 try 123 { 124 String path=System.getProperty("ch.ethz.inf.project.home") + 125 System.getProperty("file.separator","/") + 126 "site" + 127 System.getProperty("file.separator","/") + 128 "lib" + 129 System.getProperty("file.separator","/") + 130 System.getProperty("os.arch") + 131 System.getProperty("file.separator","/") + 132 System.mapLibraryName("prosevm"); 133 System.load(path); 134 } 135 catch (java.lang.UnsatisfiedLinkError noProse) 136 { 137 throw new RuntimeException (noProse.toString()); 138 } 139 } 140 141 } 142 143 } 144 145 146 147 148 149 Map fieldAccessMap; 150 Map fieldModificationMap; 151 Map methodExecutionMap; 152 Map exceptionThrowMap; 153 Map exceptionCatchMap; 154 JoinPointHook hook = null; 155 public boolean isInitialized = false; 157 158 static class CompoundAopTag 159 { 160 Object entryTag = null; 161 Object exitTag = null; 162 } 163 164 static ThreadLocal cflows = new ThreadLocal () 165 { 166 public Object initialValue() 167 { 168 synchronized(AspectInterfaceImpl.class) 169 { 170 return new ControlFlow(); 171 } 172 173 } 174 }; 175 176 private ControlFlow getCflow() 177 { 178 ControlFlow crtFlow = (ControlFlow)cflows.get(); 179 if (crtFlow == null) 180 { 181 throw new Error ("AspectInterface.getCflow: cflow should be always non-null\n"); 182 } 183 return crtFlow; 184 } 185 private ClassLoader contingencyLoader = null; 186 187 211 public synchronized void startup(String [] packagePrefixes, boolean openWorldAssumption) 212 { 213 Class toload; 215 toload=ch.ethz.inf.iks.jvmai.jvmdi.AbsentInformationException.class; 216 toload=ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl.class; 217 toload=ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl.CompoundAopTag.class; 218 toload=ch.ethz.inf.iks.jvmai.jvmdi.CodeJoinPointImpl.class; 219 toload=ch.ethz.inf.iks.jvmai.jvmdi.CodeSignatureImpl.class; 220 toload=ch.ethz.inf.iks.jvmai.jvmdi.ControlFlow.class; 221 toload=ch.ethz.inf.iks.jvmai.jvmdi.DebuggerProvider.class; 222 toload=ch.ethz.inf.iks.jvmai.jvmdi.ExceptionJoinPointImpl.class; 223 toload=ch.ethz.inf.iks.jvmai.jvmdi.ExceptionCatchJoinPointImpl.class; 224 toload=ch.ethz.inf.iks.jvmai.jvmdi.FieldAccessJoinPointImpl.class; 225 toload=ch.ethz.inf.iks.jvmai.jvmdi.FieldJoinPointImpl.class; 226 toload=ch.ethz.inf.iks.jvmai.jvmdi.FieldModificationJoinPointImpl.class; 227 toload=ch.ethz.inf.iks.jvmai.jvmdi.FieldSignatureImpl.class; 228 toload=ch.ethz.inf.iks.jvmai.jvmdi.InvalidObjectException.class; 229 toload=ch.ethz.inf.iks.jvmai.jvmdi.InvalidVmStateException.class; 230 toload=ch.ethz.inf.iks.jvmai.jvmdi.ItemManipulationException.class; 231 toload=ch.ethz.inf.iks.jvmai.jvmdi.JoinPointContext.class; 232 toload=ch.ethz.inf.iks.jvmai.jvmdi.JoinPointLocation.class; 233 toload=ch.ethz.inf.iks.jvmai.jvmdi.MethodExecutionJoinPointImpl.class; 234 toload=ch.ethz.inf.iks.jvmai.jvmdi.ProseVmException.class; 235 toload=ch.ethz.inf.iks.jvmai.jvmdi.SignatureFormatException.class; 236 toload=ch.ethz.inf.iks.jvmai.jvmdi.StackFrameException.class; 237 toload=ch.ethz.inf.iks.jvmai.jvmdi.ThreadStateException.class; 238 239 toload=ch.ethz.jvmai.CannotSetWatchException.class; 240 toload=ch.ethz.jvmai.CatchClauseSignature.class; 241 toload=ch.ethz.jvmai.ClassSpecific.class; 242 toload=ch.ethz.jvmai.CodeJoinPoint.class; 243 toload=ch.ethz.jvmai.ExceptionJoinPoint.class; 244 toload=ch.ethz.jvmai.ExceptionCatchJoinPoint.class; 245 toload=ch.ethz.jvmai.FieldAccessJoinPoint.class; 246 toload=ch.ethz.jvmai.FieldJoinPoint.class; 247 toload=ch.ethz.jvmai.FieldModificationJoinPoint.class; 248 toload=ch.ethz.jvmai.FieldSignature.class; 249 toload=ch.ethz.jvmai.InvalidIdException.class; 250 toload=ch.ethz.jvmai.JVMAIException.class; 251 toload=ch.ethz.jvmai.JVMAIRuntimeException.class; 252 toload=ch.ethz.jvmai.JVMAspectInterface.class; 253 toload=ch.ethz.jvmai.JoinPoint.class; 254 toload=ch.ethz.jvmai.JoinPointHook.class; 255 toload=ch.ethz.jvmai.JoinPointStaticPart.class; 256 toload=ch.ethz.jvmai.MethodEntryJoinPoint.class; 257 toload=ch.ethz.jvmai.MethodExitJoinPoint.class; 258 toload=ch.ethz.jvmai.MethodSignature.class; 259 toload=ch.ethz.jvmai.NotInitializedException.class; 260 toload=ch.ethz.jvmai.Provider.class; 261 toload=ch.ethz.jvmai.Signature.class; 262 toload=ch.ethz.jvmai.StartupException.class; 263 toload=ch.ethz.jvmai.WatchAlreadySetException.class; 264 toload=ch.ethz.jvmai.WatchNotSetException.class; 265 266 Object crtClow=cflows.get(); 267 268 methodExecutionMap = new HashMap (); 269 fieldAccessMap = new HashMap (); 270 fieldModificationMap = new HashMap (); 271 exceptionThrowMap = new HashMap (); 272 exceptionCatchMap = new HashMap (); 273 274 if (contingencyLoader == null) 275 { 276 Iterator i = doGetClasses().iterator(); 277 while(i.hasNext() && contingencyLoader == null) 278 { 279 Class cls=(Class )i.next(); 280 contingencyLoader=cls.getClassLoader(); 281 } 282 } 283 284 285 doStartup(packagePrefixes,openWorldAssumption); 286 isInitialized = true; 287 } 288 289 290 302 303 public void setJoinPointHook(JoinPointHook hook) 304 { 305 if (!isInitialized) 306 { 307 throw new NotInitializedException("AspectInterfaceImpl.setJoinPointHook: JVMAI not initialized"); 308 } 309 this.hook = hook; 310 } 311 312 public void teardown() 313 { 314 isInitialized=false; 315 fieldAccessMap = null; 316 fieldModificationMap = null; 317 methodExecutionMap = null; 318 exceptionThrowMap = null; 319 doTeardown(); 320 } 321 322 private void setWatchPrecondition(Object arg, Object aopTag) 323 { 324 if (!isInitialized) 325 throw new NotInitializedException("JVMAspectInterface.setWatch: jvmai not initialized"); 326 if (arg == null) 327 throw new NullPointerException ("JVMAspectInterface.setWatch: null argument parameter"); 328 if (aopTag == null) 329 throw new IllegalArgumentException ("JVMAspectInterface.setWatch: null aopTag value"); 330 } 331 332 347 public void setFieldAccessWatch(Field f, Object aopTag) 348 { 349 setWatchPrecondition(f,aopTag); 350 synchronized(fieldAccessMap) 351 { 352 try 353 { 354 doSetFieldAccessWatch(f.getDeclaringClass(),f,aopTag); 355 fieldAccessMap.put(f,aopTag); 356 } 357 catch (NullPointerException e) 358 { e.printStackTrace();} 359 } 360 } 361 362 372 public void clearFieldAccessWatch(Field field) 373 { 374 if (!isInitialized) 375 throw new NotInitializedException("JVMAspectInterface.clearFieldAccessWatch: jvmai not initialized"); 376 if (field == null) 377 throw new NullPointerException ("JVMAspectInterface.clearFieldAccessWatch: null cls parameter"); 378 379 synchronized(fieldAccessMap) 380 { 381 doClearFieldAccessWatch(field.getDeclaringClass(),field); 382 fieldAccessMap.remove(field); 383 } 384 } 385 386 401 public void setFieldModificationWatch(Field field, Object aopTag) 402 { 403 setWatchPrecondition(field,aopTag); 404 405 synchronized(fieldModificationMap) 406 { 407 doSetFieldModificationWatch(field.getDeclaringClass(),field,aopTag); 408 fieldModificationMap.put(field,aopTag); 409 } 410 } 411 412 422 public void clearFieldModificationWatch(Field field) 423 { 424 425 if (!isInitialized) 426 throw new NotInitializedException("JVMAspectInterface.clearFielddModificationWatch: jvmai not initialized"); 427 428 synchronized(fieldModificationMap) 429 { 430 doClearFieldModificationWatch(field.getDeclaringClass(),field); 431 fieldModificationMap.remove(field); 432 } 433 } 434 435 436 private HashMap endLocationsMap = new HashMap (); 442 443 444 private List returnLocations(Method m) 446 { 447 448 List endLocations = (List )endLocationsMap.get(m); 450 if (endLocations != null) 451 return endLocations; 452 else 453 endLocations= new java.util.Vector (); 454 455 456 InstructionList iList = null; 458 byte[] code = null; 459 try 460 { 461 code = doGetByteCode(m.getDeclaringClass(),m); 462 iList=new InstructionList(code); 463 } 464 catch (Exception e) 465 { 466 code = doGetByteCodeWithoutJvmdi(m); 467 iList= new InstructionList(code); 468 } 469 470 InstructionHandle[] instructions = iList.getInstructionHandles(); 472 for (int i=0; i < instructions.length; i++) 473 { 474 if (instructions[i].getInstruction() instanceof ReturnInstruction) 475 endLocations.add(new Integer (instructions[i].getPosition())); 476 } 477 478 if ( (code.length == 1 || code.length == 0) && (!endLocations.contains(new Integer (0)))) 480 { 481 endLocations.add(new Integer (0)); 482 } 483 endLocationsMap.put(m,endLocations); 484 return endLocations; 485 } 486 487 488 489 private byte[] doGetByteCodeWithoutJvmdi (Method m) 490 { 491 ClassLoader cl; 492 493 cl= m.getDeclaringClass().getClassLoader(); 494 if (cl == null) 495 cl = contingencyLoader; 496 497 String fileName = m.getDeclaringClass().getName().replace('.','/') + ".class"; 498 URL resource = cl.getResource(fileName); 499 InputStream classStream = cl.getResourceAsStream(fileName); 500 try 501 { 502 ClassParser cparser=new ClassParser(classStream,fileName); 504 JavaClass parsedClass = cparser.parse(); 505 org.apache.bcel.classfile.Method[] methods = parsedClass.getMethods(); 506 org.apache.bcel.classfile.Method javaMethod = null; 507 for (int i = 0; i < methods.length && javaMethod == null; i++) 508 { 509 if (methods[i].getName().equals(m.getName()) && 510 JNIUtil.jniSignature(m).equals(methods[i].getSignature())) 511 { 512 javaMethod=methods[i]; 513 } 514 } 515 classStream.close(); 516 517 if (javaMethod != null) 518 { 519 return javaMethod.getCode().getCode(); 520 } 521 else 522 { 523 throw new Error ("could not find method in code"); 524 } 525 526 } 527 catch (IOException cannotAccessClassCode) 528 { 529 throw new RuntimeException (cannotAccessClassCode.toString()); 530 } 531 } 532 533 534 549 public synchronized void setMethodEntryWatch(Method m, Object aopTag) 550 { 551 setWatchPrecondition(m,aopTag); 553 if ((m.getModifiers() & (Modifier.ABSTRACT | Modifier.NATIVE)) != 0) 554 throw new CannotSetWatchException("JVMAspectInterface.setMethodEntryWatch: cannot set watches on interfaces"); 555 556 CompoundAopTag executionTag = (CompoundAopTag)methodExecutionMap.get(m); 558 559 560 if (executionTag == null) 561 executionTag = new CompoundAopTag(); 562 if (executionTag.entryTag != null) 563 throw new WatchAlreadySetException("JVMAspectInterface.setMethodEntryWatch:" + m); 564 else 565 executionTag.entryTag=aopTag; 566 567 CompoundAopTag tagToBeSet; 570 boolean tagIsCommonToEntryExit = false; 571 if (returnLocations(m).contains(new Integer (0))) 572 { 573 tagToBeSet=executionTag; 574 tagIsCommonToEntryExit = true; 575 } 576 else 577 { 578 tagToBeSet=new CompoundAopTag(); 579 tagToBeSet.entryTag=aopTag; 580 tagToBeSet.exitTag=null; 581 tagIsCommonToEntryExit = false; 582 } 583 584 try 586 { 587 doSetLocationWatch(m.getDeclaringClass(),m,0,tagToBeSet); 588 589 } 590 catch (WatchAlreadySetException e) 591 { 592 if (!(tagIsCommonToEntryExit && executionTag.exitTag!=null)) 593 throw new Error ("JVMAspectInteface.setMethodEntryWatch:" + 594 "JMD reports watch already set, but the exit tag is null"); 595 } 596 methodExecutionMap.put(m,executionTag); 597 598 } 599 600 610 public synchronized void clearMethodEntryWatch(Method m) 611 { 612 613 if (!isInitialized) 615 throw new NotInitializedException("JVMAspectInterface.clearMethodEntryWatch: jvmai not initialized"); 616 if (m == null) 617 throw new NullPointerException ("JVMAspectInterface.clearMethodEntryWatch: null m parameter"); 618 if ((m.getModifiers() & (Modifier.ABSTRACT | Modifier.NATIVE)) != 0) 619 throw new CannotSetWatchException("JVMAspectInterface.setMethodEntryWatch: cannot clear watches on interfaces"); 620 621 CompoundAopTag oldTag = (CompoundAopTag) methodExecutionMap.get(m); 623 if (oldTag == null) 624 { 625 throw new WatchNotSetException("JVMAspectInterface.clearMethodEntryWatch"); 626 } 627 628 if (oldTag.entryTag == null) 630 throw new WatchNotSetException("JVMAspectInterface.clearMethodEntryWatch:" + m); 631 else 632 oldTag.entryTag = null; 633 634 if (oldTag.exitTag == null || (!returnLocations(m).contains(new Integer (0))) ) 638 { 639 doClearLocationWatch(m.getDeclaringClass(),m,0); 640 } 641 642 if (oldTag.exitTag == null) 644 methodExecutionMap.remove(m); 645 646 } 647 648 649 665 public synchronized void setMethodExitWatch(Method m, Object aopTag) 666 { 667 setWatchPrecondition(m,aopTag); 669 if ((m.getModifiers() & (Modifier.ABSTRACT | Modifier.NATIVE)) != 0) 670 throw new CannotSetWatchException("JVMAspectInterface.setMethodExitWatch: cannot set watches on interfaces"); 671 672 CompoundAopTag compoundTag = (CompoundAopTag)methodExecutionMap.get(m); 674 if (compoundTag == null) 675 { 676 compoundTag = new CompoundAopTag(); 677 methodExecutionMap.put(m,compoundTag); 678 } 679 680 if (compoundTag.exitTag != null) 681 throw new WatchAlreadySetException("JVMAspectInteface.setMethodExitWatch" + m); 682 compoundTag.exitTag = aopTag; 683 684 687 List endLocations = returnLocations(m); 688 689 Iterator j = endLocations.iterator(); 691 while (j.hasNext()) 692 { 693 694 CompoundAopTag tagToBeSet; 695 int bci = ((Integer )(j.next())).intValue(); 696 697 698 if (bci == 0) 699 { 700 tagToBeSet=compoundTag; 702 } 703 else 704 { 705 tagToBeSet=new CompoundAopTag(); 707 tagToBeSet.entryTag=null; 708 tagToBeSet.exitTag=aopTag; 709 } 710 711 712 try 713 { 714 doSetLocationWatch(m.getDeclaringClass(),m,bci,tagToBeSet); 715 } 716 catch (WatchAlreadySetException entryWatchOnZeroLengthMethod) 717 { 718 if (compoundTag.entryTag != null && bci == 0) 721 {} else 723 { 724 Error x =new Error ("JVMAspectInterface.setMethodEntryWatch: " + 726 " watch set on exit in spite of non-zero length method:" + m); 727 x.printStackTrace(); 728 throw x; 729 } 730 } 731 } 732 } 733 734 744 public synchronized void clearMethodExitWatch(Method m) 745 { 746 if (!isInitialized) 748 throw new NotInitializedException("JVMAspectInterface.clearMethodExitWatch: jvmai not initialized"); 749 if (m == null) 750 throw new NullPointerException ("JVMAspectInterface.clearMethodExitWatch: null Method parameter"); 751 if (m.getDeclaringClass().isInterface()) 752 throw new WatchNotSetException("JVMAspectInterface.clearMethodExitWatch: cannot clear watches on interfaces"); 753 754 CompoundAopTag compoundTag = (CompoundAopTag)methodExecutionMap.get(m); 756 757 if (compoundTag == null || compoundTag.exitTag == null) 758 { 759 throw new WatchNotSetException("JVMAspectInterface.clearMethodExitWatch: " + m); 760 } 761 compoundTag.exitTag = null; 762 763 765 Iterator j = returnLocations(m).iterator(); 766 767 768 while (j.hasNext()) 769 { 770 int bci = ((Integer )(j.next())).intValue(); 771 if (bci != 0 || (compoundTag.entryTag == null)) 772 { 773 doClearLocationWatch(m.getDeclaringClass(),m,bci); 774 } 775 } 776 777 if (compoundTag.entryTag == null) 779 methodExecutionMap.remove(m); 780 } 781 782 794 public void setExceptionThrowWatch(Class cls, Object aopTag) 795 { 796 setWatchPrecondition(cls,aopTag); 797 798 synchronized(exceptionThrowMap) 799 { 800 doSetExceptionWatch(cls,aopTag); 801 exceptionThrowMap.put(cls, aopTag); 802 } 803 804 } 805 806 815 public void clearExceptionThrowWatch(Class cls) 816 { 817 818 if (!isInitialized) 819 throw new NotInitializedException("JVMAspectInterface.clearExceptionThrowWatch: jvmai not initialized"); 820 if (cls == null) 821 throw new NullPointerException ("JVMAspectInterface.clearExceptionThrowWatch: null cls parameter"); 822 823 synchronized(exceptionThrowMap) 824 { 825 doClearExceptionWatch(cls); 826 if (exceptionThrowMap.containsKey(cls)) 827 exceptionThrowMap.remove(cls); 828 else 829 throw new WatchNotSetException(); 830 } 831 832 } 833 834 835 847 public void setExceptionCatchWatch(Class cls, Object aopTag) { 848 setWatchPrecondition(cls,aopTag); 849 850 synchronized(exceptionCatchMap) { 851 doSetExceptionCatchWatch(cls,aopTag); 852 exceptionCatchMap.put(cls, aopTag); 853 } 854 } 855 856 864 public void clearExceptionCatchWatch(Class cls) { 865 866 if (!isInitialized) 867 throw new NotInitializedException("JVMAspectInterface.clearExceptionCatchWatch: jvmai not initialized"); 868 if (cls == null) 869 throw new NullPointerException ("JVMAspectInterface.clearExceptionCatchWatch: null cls parameter"); 870 871 synchronized(exceptionCatchMap) { 872 doClearExceptionCatchWatch(cls); 873 if (exceptionCatchMap.containsKey(cls)) 874 exceptionCatchMap.remove(cls); 875 else 876 throw new WatchNotSetException(); 877 } 878 } 879 880 881 892 public void suspendNotification(Thread thread) 893 { 894 if (!isInitialized) 895 throw new NotInitializedException("JVMAspectInterface.resumeNotification: jvmai not initialized"); 896 897 doSuspendNotification(thread); 898 } 899 900 910 public void resumeNotification(Thread thread) 911 { 912 if (!isInitialized) 913 throw new NotInitializedException("JVMAspectInterface.resumeNotification: jvmai not initialized"); 914 doResumeNotification(thread); 915 } 916 917 public List getLoadedClasses() 918 { 919 return doGetClasses(); 920 } 921 922 private void doOnClassLoad(Class cls) 923 { 924 925 if (hook==null) 926 return; 927 928 hook.onClassLoad(cls); 929 } 930 931 private void doOnMethodExecution(MethodExecutionJoinPointImpl jp) 932 { 933 if (hook==null) 935 return; 936 937 938 Method method = jp.getMethod(); 939 CompoundAopTag compoundTag = (CompoundAopTag)jp.getAopTag(); 940 941 if (compoundTag.entryTag!=null) 942 { 943 jp.aopTag = compoundTag.entryTag; 944 jp.setKind(true); 945 hook.onMethodEntry(jp); 946 } 947 if (compoundTag.exitTag != null) 948 { 949 jp.aopTag = compoundTag.exitTag; 950 jp.setKind(false); 951 hook.onMethodExit(jp); 952 } 953 } 954 955 private void doOnFieldAccess(FieldAccessJoinPointImpl jp) 956 { 957 if (hook==null) 958 return; 959 hook.onFieldAccess(jp); 960 } 961 962 private void doOnFieldModification(FieldModificationJoinPointImpl jp) 963 { 964 if (hook==null) 965 return; 966 967 hook.onFieldModification(jp); 968 } 969 970 private void doOnExceptionThrow(ExceptionJoinPointImpl jp) 971 { 972 if (hook==null) 973 return; 974 975 hook.onExceptionThrow(jp); 976 } 977 978 private void doOnExceptionCatch(ExceptionCatchJoinPointImpl jp) { 979 try 980 { 981 if (hook==null) 983 return; 984 985 hook.onExceptionCatch(jp); 986 } catch (Throwable x) 987 { 988 System.err.println("BBBBB"); 989 } 990 } 991 992 993 994 private native void doStartup(Object [] prefixes, boolean openWorld); 995 private native void doTeardown(); 996 private native void doSetLocationWatch(Class c, Method m, int bci,Object tag); 997 private native void doClearLocationWatch(Class c, Method m, int bci); 998 private native void doSetFieldAccessWatch(Class c, Field f,Object tag); 999 private native void doClearFieldAccessWatch(Class c, Field f); 1000 private native void doSetFieldModificationWatch(Class c, Field f, Object tag); 1001 private native void doClearFieldModificationWatch(Class c, Field f); 1002 private native void doSetExceptionWatch(Class throwableClass, Object tag); 1003 private native void doClearExceptionWatch(Class trowableClass); 1004 private native void doSetExceptionCatchWatch(Class throwableClass, Object tag); 1005 private native void doClearExceptionCatchWatch(Class trowableClass); 1006 private native byte [] doGetByteCode(Class c, Method m); 1007 private native List doGetClasses(); 1008 private native void doSuspendNotification(Thread t); 1009 private native void doResumeNotification(Thread t); 1010} 1011 1012 | Popular Tags |