Java Doc for ClassManagerImpl.java in  » Swing-Library » jEdit » org » gjt » sp » jedit » bsh » classpath » 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 » Swing Library » jEdit » org.gjt.sp.jedit.bsh.classpath 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.gjt.sp.jedit.bsh.BshClassManager
      org.gjt.sp.jedit.bsh.classpath.ClassManagerImpl

ClassManagerImpl
public class ClassManagerImpl extends BshClassManager (Code)
 Manage all classloading in BeanShell.
 Allows classpath extension and class file reloading.
 This class holds the implementation of the BshClassManager so that it
 can be separated from the core package.
 This class currently relies on 1.2 for BshClassLoader and weak references.
 Is there a workaround for weak refs?  If so we could make this work
 with 1.1 by supplying our own classloader code...
 See "http://www.beanshell.org/manual/classloading.html" for details
 on the bsh classloader architecture.
 Bsh has a multi-tiered class loading architecture.  No class loader is
 created unless/until a class is generated, the classpath is modified, 
 or a class is reloaded.
 Note: we may need some synchronization in here
 Note on jdk1.2 dependency:
 We are forced to use weak references here to accomodate all of the 
 fleeting namespace listeners.  (NameSpaces must be informed if the class 
 space changes so that they can un-cache names).  I had the interesting 
 thought that a way around this would be to implement BeanShell's own 
 garbage collector...  Then I came to my senses and said - screw it, 
 class re-loading will require 1.2.
 ---------------------
 Classloading precedence:
 in-script evaluated class (scripted class)
 in-script added / modified classpath
 optionally, external classloader
 optionally, thread context classloader
 plain Class.forName()
 source class (.java file in classpath)
 


Field Summary
final static  StringBSH_PACKAGE
    

Constructor Summary
public  ClassManagerImpl()
    

Method Summary
public  voidaddClassPath(URL path)
    
public  voidaddListener(Listener l)
    
public  ClassclassForName(String name)
    
protected  voidclassLoaderChanged()
     Clear global class cache and notify namespaces to clear their class caches.
public  ClassdefineClass(String name, byte[] code)
     Get the BeanShell classloader.
public  voiddoSuperImport()
     Support for "import *;" Hide details in here as opposed to NameSpace.
public  voiddump(PrintWriter i)
    
public  ClassLoadergetBaseLoader()
    
public  StringgetClassNameByUnqName(String name)
     Return the name or null if none is found, Throw an ClassPathException containing detail if name is ambigous.
public  BshClassPathgetClassPath()
     Get the full blown classpath.
 ClassLoadergetLoaderForClass(String name)
    
public  URLgetResource(String path)
    
public  InputStreamgetResourceAsStream(String path)
    
protected  booleanhasSuperImport()
    
public  voidreloadAllClasses()
     Overlay the entire path with a new class loader.
public  voidreloadClasses(String[] classNames)
     Reloading classes means creating a new classloader and using it whenever we are asked for classes in the appropriate space.
public  voidreloadPackage(String pack)
     Reload all classes in the specified package: e.g.
public  voidremoveListener(Listener l)
    
public  voidreset()
     Clear all classloading behavior and class caches and reset to initial state.
public  voidsetClassPath(URL[] cp)
     Set a new base classpath and create a new base classloader. This means all types change.

Field Detail
BSH_PACKAGE
final static String BSH_PACKAGE(Code)




Constructor Detail
ClassManagerImpl
public ClassManagerImpl()(Code)
Used by BshClassManager singleton constructor




Method Detail
addClassPath
public void addClassPath(URL path) throws IOException(Code)



addListener
public void addListener(Listener l)(Code)



classForName
public Class classForName(String name)(Code)
the class or null



classLoaderChanged
protected void classLoaderChanged()(Code)
Clear global class cache and notify namespaces to clear their class caches. The listener list is implemented with weak references so that we will not keep every namespace in existence forever.



defineClass
public Class defineClass(String name, byte[] code)(Code)
Get the BeanShell classloader. public ClassLoader getClassLoader() { }



doSuperImport
public void doSuperImport() throws UtilEvalError(Code)
Support for "import *;" Hide details in here as opposed to NameSpace.



dump
public void dump(PrintWriter i)(Code)



getBaseLoader
public ClassLoader getBaseLoader()(Code)



getClassNameByUnqName
public String getClassNameByUnqName(String name) throws ClassPathException(Code)
Return the name or null if none is found, Throw an ClassPathException containing detail if name is ambigous.



getClassPath
public BshClassPath getClassPath() throws ClassPathException(Code)
Get the full blown classpath.



getLoaderForClass
ClassLoader getLoaderForClass(String name)(Code)



getResource
public URL getResource(String path)(Code)
Get a resource URL using the BeanShell classpath
Parameters:
  path - should be an absolute path



getResourceAsStream
public InputStream getResourceAsStream(String path)(Code)
Get a resource stream using the BeanShell classpath
Parameters:
  path - should be an absolute path



hasSuperImport
protected boolean hasSuperImport()(Code)



reloadAllClasses
public void reloadAllClasses() throws ClassPathException(Code)
Overlay the entire path with a new class loader. Set the base path to the user path + base path. No point in including the boot class path (can't reload thos).



reloadClasses
public void reloadClasses(String[] classNames) throws ClassPathException(Code)
Reloading classes means creating a new classloader and using it whenever we are asked for classes in the appropriate space. For this we use a DiscreteFilesClassLoader



reloadPackage
public void reloadPackage(String pack) throws ClassPathException(Code)
Reload all classes in the specified package: e.g. "com.sun.tools" The special package name "" can be used to refer to unpackaged classes.



removeListener
public void removeListener(Listener l)(Code)



reset
public void reset()(Code)
Clear all classloading behavior and class caches and reset to initial state.



setClassPath
public void setClassPath(URL[] cp)(Code)
Set a new base classpath and create a new base classloader. This means all types change.



Fields inherited from org.gjt.sp.jedit.bsh.BshClassManager
protected transient Hashtable absoluteClassCache(Code)(Java Doc)
protected transient Hashtable absoluteNonClasses(Code)(Java Doc)
protected transient Hashtable definingClasses(Code)(Java Doc)
protected transient Hashtable definingClassesBaseNames(Code)(Java Doc)
protected ClassLoader externalClassLoader(Code)(Java Doc)
protected transient Hashtable resolvedObjectMethods(Code)(Java Doc)
protected transient Hashtable resolvedStaticMethods(Code)(Java Doc)

Methods inherited from org.gjt.sp.jedit.bsh.BshClassManager
public void addClassPath(URL path) throws IOException(Code)(Java Doc)
public void addListener(Listener l)(Code)(Java Doc)
public void cacheClassInfo(String name, Class value)(Code)(Java Doc)
public void cacheResolvedMethod(Class clas, Class[] types, Method method)(Code)(Java Doc)
public boolean classExists(String name)(Code)(Java Doc)
public Class classForName(String name)(Code)(Java Doc)
protected void classLoaderChanged()(Code)(Java Doc)
protected void clearCaches()(Code)(Java Doc)
protected static UtilEvalError cmUnavailable()(Code)(Java Doc)
public static BshClassManager createClassManager(Interpreter interpreter)(Code)(Java Doc)
public Class defineClass(String name, byte[] code)(Code)(Java Doc)
protected void definingClass(String className)(Code)(Java Doc)
protected void doSuperImport() throws UtilEvalError(Code)(Java Doc)
protected void doneDefiningClass(String className)(Code)(Java Doc)
public void dump(PrintWriter pw)(Code)(Java Doc)
protected String getClassBeingDefined(String className)(Code)(Java Doc)
protected String getClassNameByUnqName(String name) throws UtilEvalError(Code)(Java Doc)
protected Method getResolvedMethod(Class clas, String methodName, Class[] types, boolean onlyStatic)(Code)(Java Doc)
public URL getResource(String path)(Code)(Java Doc)
public InputStream getResourceAsStream(String path)(Code)(Java Doc)
protected boolean hasSuperImport()(Code)(Java Doc)
protected boolean isClassBeingDefined(String className)(Code)(Java Doc)
protected Class loadSourceClass(String name)(Code)(Java Doc)
protected static Error noClassDefFound(String className, Error e)(Code)(Java Doc)
public Class plainClassForName(String name) throws ClassNotFoundException(Code)(Java Doc)
public void reloadAllClasses() throws UtilEvalError(Code)(Java Doc)
public void reloadClasses(String[] classNames) throws UtilEvalError(Code)(Java Doc)
public void reloadPackage(String pack) throws UtilEvalError(Code)(Java Doc)
public void removeListener(Listener l)(Code)(Java Doc)
public void reset()(Code)(Java Doc)
public void setClassLoader(ClassLoader externalCL)(Code)(Java Doc)
public void setClassPath(URL[] cp) throws UtilEvalError(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.