Java Doc for HotSwapAspectInterfaceImpl.java in  » Byte-Code » PROSE » ch » ethz » inf » iks » jvmai » jvmdi » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Byte Code » PROSE » ch.ethz.inf.iks.jvmai.jvmdi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl
      ch.ethz.inf.iks.jvmai.jvmdi.HotSwapAspectInterfaceImpl

HotSwapAspectInterfaceImpl
public class HotSwapAspectInterfaceImpl extends AspectInterfaceImpl (Code)
HotSwapAspectInterfaceImpl class.
author:
   Angela Nicoara
author:
   Gerald Linhofer
version:
   $Revision: 1.1.2.5 $


Field Summary
protected static  ObjectaopNullTag
     Replacement tag, will be used as tag, if the user supplied tag is null.
protected static  CacheMapclassFileMap
    
protected static  HotSwapClassRegisterclassRegister
    
protected static  HotSwapConstructorJoinPointImplconstructorJoinPoint
    
protected static  ObjectconstructorTags
    
protected static  HotSwapFieldAccessJoinPointImplfieldAccessJoinPoint
    
protected static  ObjectfieldAccessTags
    
protected static  HotSwapFieldModificationJoinPointImplfieldModificationJoinPoint
    
protected static  ObjectfieldModificationTags
    
protected static  booleaninitialized
     true if HotSwapAspectInterfaceImpl was initialized.
protected static  HotSwapMethodEntryJoinPointImplmethodEntryJoinPoint
    
protected static  ObjectmethodEntryTags
    
protected static  HotSwapMethodExitJoinPointImplmethodExitJoinPoint
    
protected static  ObjectmethodExitTags
    
protected static  CacheMapresolvedFields
     Caches reflected Field objects resolved by the getFieldFromString() methods.
protected static  CacheMapresolvedMethods
     Caches reflected Method objects resolved by the getMethodFromString() methods.
protected static  SetsuspendedThreads
    

Constructor Summary
protected  HotSwapAspectInterfaceImpl()
     Constructor.

Method Summary
public synchronized  voidclearConstructorWatch(Constructor m)
     Clears a watch on a constructor joinpoint.
Parameters:
  m - the constructor beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet.
public  voidclearFieldAccessWatch(Field field)
     Clears a watch on a field access joinpoint.
Parameters:
  field - the field beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been intialized yet.
public  voidclearFieldModificationWatch(Field field)
     Clears a watch on a field modification joinpoint.
Parameters:
  field - the field beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet.
public synchronized  voidclearMethodEntryWatch(Method m)
     Clears a watch on a method entry joinpoint.
Parameters:
  m - the method beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet.
public  voidclearMethodExitWatch(Method m)
     Clears a watch on a method exit joinpoint.
Parameters:
  m - the method beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet.
public static  voiddoOnClassLoad(Class cls)
     Called when ever a new class is loaded by the VM.
public static  voiddoOnClassUnload(Class cls)
     Called when ever the VM unloads a class.
final public static  voiddoOnConstructor(int methodId)
     This callback will be invoked at constructor join points.
final public static  voiddoOnFieldAccess(Object owner, int fieldId)
     This callback will be invoked at field access join points.
final public static  voiddoOnFieldModification(Object owner, int fieldId, int slot)
     This callback will be invoked at field modification join points.
final public static  voiddoOnMethodEntry(int methodId)
     This callback will be invoked at method entry join points.
final public static  voiddoOnMethodExit(int methodId, int resultSlot)
     This callback will be invoked at method exit join points.
public static  JavaClassgetBCELClassDefinition(Class cls)
     Returns a BCEL class of a java class.
public static  FieldgetFieldFromString(String id, boolean isStatic)
     Returns the reflected Field, for a id string containing the class name, the field name and it's signature separated by '#'.

Note: The class must declare the field, if it only inherits it from a super class, this method will throw an java.lang.NoSuchFieldExceptionNoSuchFieldException .
Parameters:
  id - String holding an unique identiefier for the field.
Parameters:
  isStatic - true if the field is static.

public static  FieldgetFieldFromString(String className, String fieldName, String signature, boolean isStatic)
     Returns the reflected Field, for a id string containing the class name, the field name and it's signature separated by '#'.

Note: The class must declare the field, if it only inherits it from a super class, this method will throw an java.lang.NoSuchFieldExceptionNoSuchFieldException .
Parameters:
  className - String holding the full qualified class name.
Parameters:
  fieldName - String holding the fields name.
Parameters:
  signature - String holding the signature (type) of the field.
Parameters:
  isStatic - true if the field is static.

public static  HotSwapAspectInterfaceImplgetInstance()
     Returns the instance of HotSwapAspectInterfaceImpl and creates it if required.
public static  MembergetMethodFromString(String id)
     Returns the reflected Method, for a id string containing the class name, the method name and it's signature, separated by '#'.
public static  MembergetMethodFromString(String className, String methodName, String signature, boolean isStatic)
     Returns the reflected Method, for a id string containing the class name, the method name and it's signature, separated by '#'.

The id string for this method would be ch.ethz.inf.iks.jvmai.jvmdi.HotSwapClassWeaver#getMethodFromString#(Ljava/lang/String)Ljava/lang/reflect/Method" .

Note: The class must declare the method, if it only inherits it from a super class, this method will throw an java.lang.NoSuchMethodErrorNoSuchMethodError .
Parameters:
  className - String holding the full qualified name of the class.
Parameters:
  methodName - String holding the methods name.
Parameters:
  signature - String holding the methods signature.
Parameters:
  isStatic - true if the method is static.

public  java.io.InputStreamgetOriginalClassDefinition(Class cls)
     Returns the original class implementation from a class file in CLASS_PATH, if available.
public  voidresumeNotification(Thread thread)
     Resumes notification regarding the specified thread. Successive calls to resumeNotification without preceding calls to suspendNotification will be ignored by the jvmai-system.
Parameters:
  thread - Thread for which to reenable notification.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet.
public  voidsetConstructorWatch(Constructor m, Object aopTag)
     Sets a watch on a constructor joinpoint.
Parameters:
  m - the constructor to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance.
public  voidsetFieldAccessWatch(Field field, Object aopTag)
     Sets a watch on a field access joinpoint.
Parameters:
  field - the field to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance.
public  voidsetFieldModificationWatch(Field field, Object aopTag)
     Sets a watch on a field modification joinpoint.
Parameters:
  field - the field to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance.
public  voidsetMethodEntryWatch(Method m, Object aopTag)
     Sets a watch on a method entry joinpoint.
Parameters:
  m - the method to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance.
public synchronized  voidsetMethodExitWatch(Method m, Object aopTag)
     Sets a watch on a method exit joinpoint.
Parameters:
  m - the method to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance.
public synchronized  voidstartup(String[] packagePrefixes, boolean openWorldAssumption)
     Initializes the underlying jvmai system.

In addition, this method takes a list of java package-names and a boolean indicating how to interpret this prefixes.

public  voidsuspendNotification(Thread thread)
     Suspend notification regarding the specified thread. Successive calls to suspendNotification have to be balanced by (at least) the same number of calls to resumeNotification, or the jvmai-system will not resume notification.
Parameters:
  thread - Thread for which to disable notification.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet.
public synchronized  voidteardown()
     Teardown the AOP support.

Field Detail
aopNullTag
protected static Object aopNullTag(Code)
Replacement tag, will be used as tag, if the user supplied tag is null. (Required to store the tag in data structures that didn't allow null entries.)



classFileMap
protected static CacheMap classFileMap(Code)
Caches class definitions, which where fetched by HotSwapAspectInterfaceImpl.getOriginalClassDefinition



classRegister
protected static HotSwapClassRegister classRegister(Code)
Gathers and holds informations about field and method call join points



constructorJoinPoint
protected static HotSwapConstructorJoinPointImpl constructorJoinPoint(Code)



constructorTags
protected static Object constructorTags(Code)



fieldAccessJoinPoint
protected static HotSwapFieldAccessJoinPointImpl fieldAccessJoinPoint(Code)



fieldAccessTags
protected static Object fieldAccessTags(Code)



fieldModificationJoinPoint
protected static HotSwapFieldModificationJoinPointImpl fieldModificationJoinPoint(Code)



fieldModificationTags
protected static Object fieldModificationTags(Code)



initialized
protected static boolean initialized(Code)
true if HotSwapAspectInterfaceImpl was initialized.



methodEntryJoinPoint
protected static HotSwapMethodEntryJoinPointImpl methodEntryJoinPoint(Code)



methodEntryTags
protected static Object methodEntryTags(Code)



methodExitJoinPoint
protected static HotSwapMethodExitJoinPointImpl methodExitJoinPoint(Code)



methodExitTags
protected static Object methodExitTags(Code)



resolvedFields
protected static CacheMap resolvedFields(Code)
Caches reflected Field objects resolved by the getFieldFromString() methods.



resolvedMethods
protected static CacheMap resolvedMethods(Code)
Caches reflected Method objects resolved by the getMethodFromString() methods.



suspendedThreads
protected static Set suspendedThreads(Code)




Constructor Detail
HotSwapAspectInterfaceImpl
protected HotSwapAspectInterfaceImpl()(Code)
Constructor. Dont call it, use HotSwapAspectInterfaceImpl.getInstance getInstance() to create an instance of this class.

This is not private to allow unit testing.





Method Detail
clearConstructorWatch
public synchronized void clearConstructorWatch(Constructor m)(Code)
Clears a watch on a constructor joinpoint.
Parameters:
  m - the constructor beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no method with id methodId in class cls.
exception:
  WatchNotSetException - There exists no entry-watch on the method.



clearFieldAccessWatch
public void clearFieldAccessWatch(Field field)(Code)
Clears a watch on a field access joinpoint.
Parameters:
  field - the field beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been intialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no field with id fieldId in class cls.
exception:
  WatchNotSetException - There exists no access-watch on the field.



clearFieldModificationWatch
public void clearFieldModificationWatch(Field field)(Code)
Clears a watch on a field modification joinpoint.
Parameters:
  field - the field beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no field with id fieldId in class cls.
exception:
  WatchNotSetException - There exists no modification-watch on the field.



clearMethodEntryWatch
public synchronized void clearMethodEntryWatch(Method m)(Code)
Clears a watch on a method entry joinpoint.
Parameters:
  m - the method beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no method with id methodId in class cls.
exception:
  WatchNotSetException - There exists no entry-watch on the method.



clearMethodExitWatch
public void clearMethodExitWatch(Method m)(Code)
Clears a watch on a method exit joinpoint.
Parameters:
  m - the method beeing watched.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no method with id methodId in class cls.
exception:
  WatchNotSetException - There exists no exit-watch on the method.



doOnClassLoad
public static void doOnClassLoad(Class cls)(Code)
Called when ever a new class is loaded by the VM.
Parameters:
  cls - the new class.



doOnClassUnload
public static void doOnClassUnload(Class cls)(Code)
Called when ever the VM unloads a class. This works only with JVMDI, JVMTI has no support for unload events.
Parameters:
  cls -



doOnConstructor
final public static void doOnConstructor(int methodId)(Code)
This callback will be invoked at constructor join points. Invocation only takes place if the callback is woven in to the corresponding constructor.
Parameters:
  methodId - method identifier



doOnFieldAccess
final public static void doOnFieldAccess(Object owner, int fieldId)(Code)
This callback will be invoked at field access join points. Invocation only takes place if the callback is woven in to the corresponding method.
Parameters:
  owner - object that contains the field
Parameters:
  fieldId - field identifier



doOnFieldModification
final public static void doOnFieldModification(Object owner, int fieldId, int slot)(Code)
This callback will be invoked at field modification join points. Invocation only takes place if the callback is woven in to the corresponding method.
Parameters:
  owner - object that contains the field
Parameters:
  fieldId - field identifier
Parameters:
  slot - index of the local variable that contains the new value for the field



doOnMethodEntry
final public static void doOnMethodEntry(int methodId)(Code)
This callback will be invoked at method entry join points. Invocation only takes place if the callback is woven in to the corresponding method.
Parameters:
  methodId - method identifier



doOnMethodExit
final public static void doOnMethodExit(int methodId, int resultSlot)(Code)
This callback will be invoked at method exit join points. Invocation only takes place if the callback is woven in to the corresponding method.
Parameters:
  methodId - method identifier
Parameters:
  resultSlot - index of the result in the local variable table



getBCELClassDefinition
public static JavaClass getBCELClassDefinition(Class cls) throws ClassNotFoundException(Code)
Returns a BCEL class of a java class.
Parameters:
  cls - JavaClass BCEL class for cls
throws:
  JVMAIRuntimeException - the class is not initialized, startup()was never invoked.
throws:
  ClassNotFoundException - can not find the class or the class file



getFieldFromString
public static Field getFieldFromString(String id, boolean isStatic) throws ClassNotFoundException, NoSuchFieldException(Code)
Returns the reflected Field, for a id string containing the class name, the field name and it's signature separated by '#'.

Note: The class must declare the field, if it only inherits it from a super class, this method will throw an java.lang.NoSuchFieldExceptionNoSuchFieldException .
Parameters:
  id - String holding an unique identiefier for the field.
Parameters:
  isStatic - true if the field is static. Field
throws:
  ClassNotFoundException - can not find the class, the field belongs to.
throws:
  NoSuchFieldException - can not find the field
throws:
  InvalidIdException - the id string is not well formated.




getFieldFromString
public static Field getFieldFromString(String className, String fieldName, String signature, boolean isStatic) throws ClassNotFoundException, NoSuchFieldException(Code)
Returns the reflected Field, for a id string containing the class name, the field name and it's signature separated by '#'.

Note: The class must declare the field, if it only inherits it from a super class, this method will throw an java.lang.NoSuchFieldExceptionNoSuchFieldException .
Parameters:
  className - String holding the full qualified class name.
Parameters:
  fieldName - String holding the fields name.
Parameters:
  signature - String holding the signature (type) of the field.
Parameters:
  isStatic - true if the field is static. Field
throws:
  ClassNotFoundException - can not find the class, the field belongs to.
throws:
  NoSuchFieldException - can not find the field
throws:
  InvalidIdException - the id string is not well formated.




getInstance
public static HotSwapAspectInterfaceImpl getInstance()(Code)
Returns the instance of HotSwapAspectInterfaceImpl and creates it if required. There's only one instance of this class (Singelton Pattern). HotSwapAspectInterfaceImpl instance



getMethodFromString
public static Member getMethodFromString(String id) throws ClassNotFoundException(Code)
Returns the reflected Method, for a id string containing the class name, the method name and it's signature, separated by '#'.

The id string for this method would be ch.ethz.inf.iks.jvmai.jvmdi.HotSwapClassWeaver#getMethodFromString#(Ljava/lang/String)Ljava/lang/reflect/Method" .

Note: The class must declare the method, if it only inherits it from a super class, this method will throw an java.lang.NoSuchMethodErrorNoSuchMethodError .
Parameters:
  id - unique method identification string Member the reflected object for id (type is either java.lang.reflect.Method or java.lang.reflect.Constructor).
throws:
  java.lang.ClassNotFoundException - can not find the class, declaring the method.
throws:
  ch.ethz.jvmai.InvalidIdException - id has wrong format (doesn't contain two '#').
throws:
  java.lang.NoSuchMethodError - can not find the method in the declaring class.
throws:
  ch.ethz.jvmai.JVMAIRuntimeException - class was not initialized.




getMethodFromString
public static Member getMethodFromString(String className, String methodName, String signature, boolean isStatic) throws ClassNotFoundException(Code)
Returns the reflected Method, for a id string containing the class name, the method name and it's signature, separated by '#'.

The id string for this method would be ch.ethz.inf.iks.jvmai.jvmdi.HotSwapClassWeaver#getMethodFromString#(Ljava/lang/String)Ljava/lang/reflect/Method" .

Note: The class must declare the method, if it only inherits it from a super class, this method will throw an java.lang.NoSuchMethodErrorNoSuchMethodError .
Parameters:
  className - String holding the full qualified name of the class.
Parameters:
  methodName - String holding the methods name.
Parameters:
  signature - String holding the methods signature.
Parameters:
  isStatic - true if the method is static. Member the reflected Method or Constructor object.
throws:
  java.lang.ClassNotFoundException - can not find the class, declaring the method.
throws:
  ch.ethz.jvmai.InvalidIdException - id has wrong format (doesn't contain two '#').
throws:
  java.lang.NoSuchMethodError - can not find the method in the declaring class.
throws:
  ch.ethz.jvmai.JVMAIRuntimeException - class was not initialized.




getOriginalClassDefinition
public java.io.InputStream getOriginalClassDefinition(Class cls) throws IOException(Code)
Returns the original class implementation from a class file in CLASS_PATH, if available. This is deprecated use HotSwapAspectInterfaceImpl.getBCELClassDefinition(Class) instead.
Parameters:
  cls - Class thats implementation should be returned. InputStream with the contents of the class file.
exception:
  RuntimeException - if class file was not found.
exception:
  NullPointerException - if cls is null.



resumeNotification
public void resumeNotification(Thread thread)(Code)
Resumes notification regarding the specified thread. Successive calls to resumeNotification without preceding calls to suspendNotification will be ignored by the jvmai-system.
Parameters:
  thread - Thread for which to reenable notification.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - thread is null.



setConstructorWatch
public void setConstructorWatch(Constructor m, Object aopTag)(Code)
Sets a watch on a constructor joinpoint.
Parameters:
  m - the constructor to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance. This object may be null.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no method with id methodId in class cls.
exception:
  CannotSetWatchException - The method must not be abstract or native.
exception:
  WatchAlreadySetException - There already exists a entry-watch on the method.



setFieldAccessWatch
public void setFieldAccessWatch(Field field, Object aopTag)(Code)
Sets a watch on a field access joinpoint.
Parameters:
  field - the field to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance. This object may be null.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no field with id fieldId in class cls.
exception:
  CannotSetWatchException - ?
exception:
  WatchAlreadySetException - There already exists a access-watch on the field.



setFieldModificationWatch
public void setFieldModificationWatch(Field field, Object aopTag)(Code)
Sets a watch on a field modification joinpoint.
Parameters:
  field - the field to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance. This object may be null.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exist no field with id fieldId in class cls.
exception:
  CannotSetWatchException - ?
exception:
  WatchAlreadySetException - There already exists a modification-watch on the field.



setMethodEntryWatch
public void setMethodEntryWatch(Method m, Object aopTag)(Code)
Sets a watch on a method entry joinpoint.
Parameters:
  m - the method to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance. This object may be null.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no method with id methodId in class cls.
exception:
  CannotSetWatchException - The method must not be abstract or native.
exception:
  WatchAlreadySetException - There already exists a entry-watch on the method.



setMethodExitWatch
public synchronized void setMethodExitWatch(Method m, Object aopTag)(Code)
Sets a watch on a method exit joinpoint.
Parameters:
  m - the method to be watched.
Parameters:
  aopTag - A user-defined object saved with this watch.When the joinpoint is reached, this object ispassed to the JoinPointHook as part of theJoinPoint-instance. This object may be null.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - cls is null.
exception:
  InvalidIdException - There exists no method with id methodId in class cls.
exception:
  CannotSetWatchException - The method must not be abstract or native.
exception:
  WatchAlreadySetException - There already exists a exit-watch on the method.



startup
public synchronized void startup(String[] packagePrefixes, boolean openWorldAssumption)(Code)
Initializes the underlying jvmai system.

In addition, this method takes a list of java package-names and a boolean indicating how to interpret this prefixes. The prefixes are used by the jvmai system to determine the set of classes beeing relevant to the system at all. Depeding on the value of openWorldAssumption, prefixes are interpreted as followed:

openWorldAssumption == true
The jvmai-system is instructed to treat ALL classes as relevant, EXCEPT the ones contained in a packages starting with one of the supplied prefixes in packagePrefixes

openWorldAssumption == false
The jvmai-system is instructed to treat as relevant ONLY the classes contained in a packages starting with one of the supplied prefixes in packagePrefixes
Parameters:
  packagePrefixes - List of prefixes for java package-names.
Parameters:
  openWorldAssumption - Specifies how the prefixes are interpreted.
exception:
  StartupException - Use StartupException.getMessage() to get a detailed description




suspendNotification
public void suspendNotification(Thread thread)(Code)
Suspend notification regarding the specified thread. Successive calls to suspendNotification have to be balanced by (at least) the same number of calls to resumeNotification, or the jvmai-system will not resume notification.
Parameters:
  thread - Thread for which to disable notification.
exception:
  NotInitializedException - Aspect-interface has not been initialized yet. Call setup first.
exception:
  NullPointerException - thread is null.



teardown
public synchronized void teardown()(Code)
Teardown the AOP support. As a result, no events will be sent to the JoinPointHook.



Fields inherited from ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl
static ThreadLocal cflows(Code)(Java Doc)
protected static Repository classRepository(Code)(Java Doc)
Map exceptionCatchMap(Code)(Java Doc)
Map exceptionThrowMap(Code)(Java Doc)
Map fieldAccessMap(Code)(Java Doc)
Map fieldModificationMap(Code)(Java Doc)
protected static JoinPointHook hook(Code)(Java Doc)
public boolean isInitialized(Code)(Java Doc)
Map methodExecutionMap(Code)(Java Doc)

Methods inherited from ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl
public void addBCELClassDefiniton(InputStream definition, String name)(Code)(Java Doc)
public void clearConstructorWatch(Constructor m)(Code)(Java Doc)
public void clearExceptionCatchWatch(Class cls)(Code)(Java Doc)
public void clearExceptionThrowWatch(Class cls)(Code)(Java Doc)
public void clearFieldAccessWatch(Field field)(Code)(Java Doc)
public void clearFieldModificationWatch(Field field)(Code)(Java Doc)
public synchronized void clearMethodEntryWatch(Method m)(Code)(Java Doc)
public synchronized void clearMethodExitWatch(Method m)(Code)(Java Doc)
public List getLoadedClasses()(Code)(Java Doc)
public boolean isClassLoaded(String name)(Code)(Java Doc)
public void resumeNotification(Thread thread)(Code)(Java Doc)
public void setConstructorWatch(Constructor m, Object aopTag)(Code)(Java Doc)
public void setExceptionCatchWatch(Class cls, Object aopTag)(Code)(Java Doc)
public void setExceptionThrowWatch(Class cls, Object aopTag)(Code)(Java Doc)
public void setFieldAccessWatch(Field f, Object aopTag)(Code)(Java Doc)
public void setFieldModificationWatch(Field field, Object aopTag)(Code)(Java Doc)
public void setJoinPointHook(JoinPointHook jpHook)(Code)(Java Doc)
public synchronized void setMethodEntryWatch(Method m, Object aopTag)(Code)(Java Doc)
public synchronized void setMethodExitWatch(Method m, Object aopTag)(Code)(Java Doc)
public synchronized void startup(String[] packagePrefixes, boolean openWorldAssumption)(Code)(Java Doc)
public void suspendNotification(Thread thread)(Code)(Java Doc)
public void teardown()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.