Java Doc for HotSwapClassRegister.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.HotSwapClassRegister

HotSwapClassRegister
public class HotSwapClassRegister (Code)
Analyses classes and holds a register all found field accesses, field modifications, method calls, exception throws and exception catches.
author:
   Angela Nicoara
author:
   Gerald Linhofer
version:
   $Revision: 1.1.2.2 $

Inner Class :class RegisterMethodVisitorImpl extends EmptyVisitor

Field Summary
public static  MapknownFieldAccesses
     Maps fields to all methods known to access them.
public static  MapknownFieldModifiers
     Maps fields to all methods known to modifie them.
public static  MapknownFieldReferences
     Maps field names to collection of classes, which holds references to them.


Method Summary
public  voidclassLoaded(Class cls)
     Notification that the class cls will be loaded.
public static  HotSwapClassRegistergetInstance()
     Returns the instance of this class (this is a 'singelton', so there's only one instance).
public  voidregistrationRequest(Class cls)
     Registers a class, which may hold a field, method call or exception join point.
public  voidregistrationRequest(Package pkg)
     Registers a package, which may contain classes that may hold a field, method call or exception join point.
public  voidregistrationRequestAll()
     Scans all loaded classes for potential field, method call and exception join points.
public  voidregistrationRequestSubClasses(Class cls)
     Scans all loaded subclasses of cls for potential join points.
public  voidremoveRequest(Class cls)
     Just for convinience, this method does nothing.
public  voidremoveRequest(Package pkg)
     Stops scanning and registration of new loaded classes belonging to Package pkg.
public  voidremoveRequestAll()
     Stops scanning and registration of all new loaded classes.
public  voidremoveRequestSubClass(Class cls)
     Stops scanning and registration of new loaded sub classes of cls.
public  voidreset()
    
protected  voidscan(Class cls)
     Scans the target method for field accesses, field modifications, catched exceptions, method calls and method returns, and registers all found actions to the according map.
public  voidscanClasses(List cls)
     Scans the method byte codes of a Collection of classes.
protected  voidscanConstantPool(Class cls)
     Scans the constant pool of class cls for method and field references.
protected static  voidsetAspectInterface(HotSwapAspectInterfaceImpl aspectInterface, String[] packagePrefixes, boolean openWorldAssumption)
     Registers the JVMAspectInterface (must be called before the first call to HotSwapClassRegister.scan scan(java.lang.Class) .

Field Detail
knownFieldAccesses
public static Map knownFieldAccesses(Code)
Maps fields to all methods known to access them. Identifier for the fields are the keys, the value is a Collection, holding identifiers for the method.

The field identifier has the form Classname#FieldName#JNISignature and the method identifier Classname#MethodName#JNISignature#isStatic.




knownFieldModifiers
public static Map knownFieldModifiers(Code)
Maps fields to all methods known to modifie them. Identifier for the fields are the keys, the value is a Collection, holding identifiers for the method.

The field identifier has the form Classname#FieldName#JNISignature and the method identifier Classname#MethodName#JNISignature#isStatic.




knownFieldReferences
public static Map knownFieldReferences(Code)
Maps field names to collection of classes, which holds references to them. This Map stores results from scanConstantPool. The field name is in the form Classname#FieldName#JNISignature.





Method Detail
classLoaded
public void classLoaded(Class cls)(Code)
Notification that the class cls will be loaded. Scanns the cls if required, and triggers weaving of the class if it contains any join point.
Parameters:
  cls - the class that has been prepared



getInstance
public static HotSwapClassRegister getInstance()(Code)
Returns the instance of this class (this is a 'singelton', so there's only one instance). HotSwapClassRegister instance.



registrationRequest
public void registrationRequest(Class cls) throws ClassNotFoundException(Code)
Registers a class, which may hold a field, method call or exception join point. This class will be scanned immediatly and all potential join points will be registered.
Parameters:
  cls - class that may contain join points.
throws:
  java.io.IOException - can not read the class file.



registrationRequest
public void registrationRequest(Package pkg)(Code)
Registers a package, which may contain classes that may hold a field, method call or exception join point. This classes will be scanned and all potential join points will be registrated.

New loaded classes will alse be scaned until HotSwapClassRegister.removeRequestAll removeRequestAll() is called.
Parameters:
  pkg -




registrationRequestAll
public void registrationRequestAll()(Code)
Scans all loaded classes for potential field, method call and exception join points.

New loaded classes will alse be scaned until HotSwapClassRegister.removeRequestAll removeRequestAll() is called.




registrationRequestSubClasses
public void registrationRequestSubClasses(Class cls)(Code)
Scans all loaded subclasses of cls for potential join points.

New loaded classes will also be scanned.
Parameters:
  cls -




removeRequest
public void removeRequest(Class cls)(Code)
Just for convinience, this method does nothing.
Parameters:
  cls -



removeRequest
public void removeRequest(Package pkg)(Code)
Stops scanning and registration of new loaded classes belonging to Package pkg. If HotSwapClassRegister.registrationRequestAllregistrationRequestAll() is set, the classes will still be scanned until HotSwapClassRegister.removeRequestAll removeRequestAll() is called.
Parameters:
  pkg -



removeRequestAll
public void removeRequestAll()(Code)
Stops scanning and registration of all new loaded classes.



removeRequestSubClass
public void removeRequestSubClass(Class cls)(Code)
Stops scanning and registration of new loaded sub classes of cls. If HotSwapClassRegister.registrationRequestAll registrationRequestAll() is set, the classes will still be scanned until HotSwapClassRegister.removeRequestAll removeRequestAll() is called.
Parameters:
  cls -



reset
public void reset()(Code)
Clears all registrations and registration requests



scan
protected void scan(Class cls) throws ClassNotFoundException(Code)
Scans the target method for field accesses, field modifications, catched exceptions, method calls and method returns, and registers all found actions to the according map.
Parameters:
  cls -
throws:
  java.io.IOException - can not read the class file



scanClasses
public void scanClasses(List cls)(Code)
Scans the method byte codes of a Collection of classes. Already scanned classes will be ignored.
Parameters:
  cls - Collection holding java.lang.Class Class objects, for the classesthat will be scanned.



scanConstantPool
protected void scanConstantPool(Class cls) throws ClassNotFoundException(Code)
Scans the constant pool of class cls for method and field references.
Parameters:
  cls - the class that's constant pool should get scanned.
throws:
  ClassNotFoundException - can not find the file defining the class.



setAspectInterface
protected static void setAspectInterface(HotSwapAspectInterfaceImpl aspectInterface, String[] packagePrefixes, boolean openWorldAssumption)(Code)
Registers the JVMAspectInterface (must be called before the first call to HotSwapClassRegister.scan scan(java.lang.Class) .
Parameters:
  aspectInterface -
Parameters:
  packagePrefixes -
Parameters:
  openWorldAssumption -



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.