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


java.lang.Object
   org.netbeans.lib.profiler.classfile.ClassRepository

ClassRepository
abstract public class ClassRepository implements CommonConstants(Code)
A collection of several static methods for general class file reading functionality. Allows to set a class path, read a class from class path, generate a class that does not have a .class file (such as an array class), etc. It also keeps track of classes ever loaded by it, and allows one to iterate over these classes.
author:
   Tomas Hurka
author:
   Misha Dmitirev

Inner Class :public static class CodeRegionBCI

Field Summary
final static  StringLOCATION_VMSUPPLIED
    


Method Summary
public static  voidaddPlaceholder(PlaceholderClassInfo pci)
    
public static  voidaddVMSuppliedClassFile(String className, int classLoaderId, byte[] buf)
     Adds a VM-supplied class file to the class file cache, but not to this repository's hashtable yet.
public static  ClassInfoclassInfoForFile(File f)
     Utility method - read .class file and return class name stored in it.
public static  voidcleanup()
     Should be called after profiling finishes to cleanup any static data, close opened files, etc.
public static  voidclearCache()
    
public static  ArrayListgetAllClassVersions(String className)
    
public static  EnumerationgetClassEnumerationWithAllVersions()
    
public static  ClassPathgetClassPath()
    
public static  ArrayListgetClassesOnClasspath(ArrayList classPathElementList)
     Returns names of all classes that can be located on the given classpath.
static  intgetDefiningClassLoaderId(String className, int classLoaderId)
    
public static  CodeRegionBCIgetMethodForSourceRegion(ClassInfo clazz, int startLine, int endLine)
    
public static  CodeRegionBCIgetMethodMinAndMaxBCI(ClassInfo clazz, String methodName, String methodSignature)
    
public static  voidinitClassPaths(String workingDir, String[] classPaths)
     This is the ClassRepository internal class path initialization method.
public static  DynamicClassInfolookupClass(String className, int classLoaderId)
     Lookup a class in the class repository.
public static  BaseClassInfolookupClassOrCreatePlaceholder(String className, int classLoaderId)
     Lookup a class in the class repository.
public static  BaseClassInfolookupLoadedClass(String className, int classLoaderId, boolean allowExistingPlaceholder)
     Lookup a class in the class repository, only among those currently loaded by the VM.
public static  BaseClassInfolookupSpecialClass(String className)
     Used only for special classes, such as array classes, that don't have a .class file on the class path.

Field Detail
LOCATION_VMSUPPLIED
final static String LOCATION_VMSUPPLIED(Code)





Method Detail
addPlaceholder
public static void addPlaceholder(PlaceholderClassInfo pci)(Code)



addVMSuppliedClassFile
public static void addVMSuppliedClassFile(String className, int classLoaderId, byte[] buf)(Code)
Adds a VM-supplied class file to the class file cache, but not to this repository's hashtable yet.



classInfoForFile
public static ClassInfo classInfoForFile(File f) throws ClassNotFoundException, IOException, ClassFormatError(Code)
Utility method - read .class file and return class name stored in it.



cleanup
public static void cleanup()(Code)
Should be called after profiling finishes to cleanup any static data, close opened files, etc.



clearCache
public static void clearCache()(Code)
Will reset any cached data, will not reset data pertinent to session in progress



getAllClassVersions
public static ArrayList getAllClassVersions(String className)(Code)



getClassEnumerationWithAllVersions
public static Enumeration getClassEnumerationWithAllVersions()(Code)



getClassPath
public static ClassPath getClassPath()(Code)



getClassesOnClasspath
public static ArrayList getClassesOnClasspath(ArrayList classPathElementList)(Code)
Returns names of all classes that can be located on the given classpath. Since this method performs directory scanning, it is recommended to call it once and cache the results.



getDefiningClassLoaderId
static int getDefiningClassLoaderId(String className, int classLoaderId)(Code)



getMethodForSourceRegion
public static CodeRegionBCI getMethodForSourceRegion(ClassInfo clazz, int startLine, int endLine) throws ClassNotFoundException, IOException, BadLocationException(Code)



getMethodMinAndMaxBCI
public static CodeRegionBCI getMethodMinAndMaxBCI(ClassInfo clazz, String methodName, String methodSignature)(Code)



initClassPaths
public static void initClassPaths(String workingDir, String[] classPaths)(Code)
This is the ClassRepository internal class path initialization method. The class path is initialized to the combination of the running VM's boot, extension and main class paths (if they are available; otherwise only the main path is obtained from the tool's settings), plus the secondary class path from the settings.
Parameters:
  workingDir - working directory, needed in case the given paths are in the local form
Parameters:
  classPaths - the 3 elements should be the user, extension, and boot class paths, respectively



lookupClass
public static DynamicClassInfo lookupClass(String className, int classLoaderId) throws IOException, ClassFormatError(Code)
Lookup a class in the class repository. If it's not there, look it up on the classpath (for classes with 0 loader) or in the cache of VM-supplied classes. If the class is not found anywhere, reports this and returns null. Guaranteed to return a real class or null, but not a placeholder. Should not be called for special (array) classes - there is lookupSpecialClass() for that.



lookupClassOrCreatePlaceholder
public static BaseClassInfo lookupClassOrCreatePlaceholder(String className, int classLoaderId)(Code)
Lookup a class in the class repository. If it's not there, don't bother checking the classpath etc. - just return an instance of PlaceholderClassInfo. The rationale is that we may not ever need the real class for className; and when we need it, lookupClass() above will deliver it.



lookupLoadedClass
public static BaseClassInfo lookupLoadedClass(String className, int classLoaderId, boolean allowExistingPlaceholder)(Code)
Lookup a class in the class repository, only among those currently loaded by the VM. If there is no loaded class and allowExistingPlaceholder is true, also check for an existing placeholders. Returns either a loaded class, or if allowed an existing placeholder, or null, but not a new placeholder.



lookupSpecialClass
public static BaseClassInfo lookupSpecialClass(String className)(Code)
Used only for special classes, such as array classes, that don't have a .class file on the class path. If a class with the given name does not exist, a BaseClassInfo is created for it immediately.



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.