Java Doc for ClassLoaderManager.java in  » IDE-Netbeans » cvsclient » org » netbeans » lib » profiler » server » 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 » IDE Netbeans » cvsclient » org.netbeans.lib.profiler.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.lib.profiler.server.ClassLoaderManager

ClassLoaderManager
class ClassLoaderManager implements CommonConstants(Code)
Functionality that ultimately allows us to obtain a class given its name and class loader. One reason for this class to exist, is to enable access to non-public methods of class java.lang.ClassLoader, that allow one to obtain a class loaded by the given loader, or make sure that this class hasn't been loaded by the given loader. Also this class provides accounting for parent loader for each registered loader, which is needed at the client side to correctly perform class instrumentation. Finally, we keep track of class (actually class loader) unloading events, which is necessary e.g. during memory profiling, to prevent getMethodNamesForJMethodIds from crashing or returning "unknown method" results. Manages: - class unloading - knowing what is loader for each class in CPU profiling
author:
   Misha Dmitriev
author:
   Ian Formanek




Method Summary
static  voidaddLoader(ClassLoader loader)
    
static  voidcheckForUnloadedClasses()
     This method SHOULD be called frequently enough to allow unloaded classes go away. On the other hand, since currently it's called from monitoring code, which itself has to execute at regular enough intervals, it has to return quickly - that's why we are using a separate thread in it, that does the potentially long-executing work. In addition to just clearing a PhantomReference, the code could have removed the relevant ClassLoaderManager from Vector/Hashtable that contain these managers.
static  intgetDefiningLoaderForClass(String className, int initiatingLoaderId)
    
static  ClassgetLoadedClass(String name, int loaderIdx)
    
static  int[]getParentLoaderIdTable()
     Creates a table that maps loader id to its parent class loader.
static  int[]getThisAndParentLoaderData(int thisLoaderId)
     This whole method exists, in addition to simple getParentLoaderId() above, to make possible passing to the tool information about "chains of loaders" that may occasionally be discovered when a class is loaded.
static  voidinitialize(ProfilerServer inProfilerServer)
    
static  intregisterLoader(Class clazz)
    
static  voidsetNotifyToolAboutUnloadedClasses(boolean v)
    
public  StringtoString()
    



Method Detail
addLoader
static void addLoader(ClassLoader loader)(Code)



checkForUnloadedClasses
static void checkForUnloadedClasses()(Code)
This method SHOULD be called frequently enough to allow unloaded classes go away. On the other hand, since currently it's called from monitoring code, which itself has to execute at regular enough intervals, it has to return quickly - that's why we are using a separate thread in it, that does the potentially long-executing work. In addition to just clearing a PhantomReference, the code could have removed the relevant ClassLoaderManager from Vector/Hashtable that contain these managers. We can implement that later.



getDefiningLoaderForClass
static int getDefiningLoaderForClass(String className, int initiatingLoaderId)(Code)



getLoadedClass
static Class getLoadedClass(String name, int loaderIdx)(Code)



getParentLoaderIdTable
static int[] getParentLoaderIdTable()(Code)
Creates a table that maps loader id to its parent class loader. An array that maps class loader id (idx) to its parent class loader it ([idx])



getThisAndParentLoaderData
static int[] getThisAndParentLoaderData(int thisLoaderId)(Code)
This whole method exists, in addition to simple getParentLoaderId() above, to make possible passing to the tool information about "chains of loaders" that may occasionally be discovered when a class is loaded. I.e. it may happen that a new loader A is created, then A creates a child loader B, and finally a class is loaded by B. At this time we happen to register *both* loaders B and A in registerLoader() above, and also parent loader A gets a loaderId with a *greater* value than that for B. So for the tool to adequately reflect the class loader structure of the application, we need to pass info about more than 2 loaders with a single class. Fortunately, when there are x>2 loaders involved, the first x-1 get sequentially growing IDs. So what is returned here in the int[3] array, is the ID for the first and the last loader in such a chain, plus the chain length (which is 0 in the case of a simple child-parent pair).
Parameters:
  thisLoaderId - Class loader Id whose parent we are looking for a 3 item array [0]=first loader in chain, [1]=last loader in chain, [2]=chain length, can be 0 insimple case



initialize
static void initialize(ProfilerServer inProfilerServer)(Code)



registerLoader
static int registerLoader(Class clazz)(Code)



setNotifyToolAboutUnloadedClasses
static void setNotifyToolAboutUnloadedClasses(boolean v)(Code)



toString
public String toString()(Code)
Debugging support



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.