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

BshClassPath
public class BshClassPath implements ClassPathListener,NameSource(Code)
A BshClassPath encapsulates knowledge about a class path of URLs. It can maps all classes the path which may include: jar/zip files and base dirs A BshClassPath may composite other BshClassPaths as components of its path and will reflect changes in those components through its methods and listener interface. Classpath traversal is done lazily when a call is made to getClassesForPackage() or getClassSource() or can be done explicitily through insureInitialized(). Feedback on mapping progress is provided through the MappingFeedback interface. Design notes: Several times here we traverse ourselves and our component paths to produce a composite view of some thing relating to the path. This would be an opportunity for a visitor pattern.

Inner Class :abstract public static class ClassSource
Inner Class :public static class JarClassSource extends ClassSource
Inner Class :public static class DirClassSource extends ClassSource
Inner Class :public static class GeneratedClassSource extends ClassSource
Inner Class :static class UnqualifiedNameTable extends HashMap
Inner Class :public static class AmbiguousName
Inner Class :public static interface MappingFeedback

Field Summary
static  BshClassPathbootClassPath
    
 Vectorlisteners
    
static  MappingFeedbackmappingFeedbackListener
    
 Stringname
    
 ListnameSourceListeners
    
static  BshClassPathuserClassPath
    
static  URL[]userClassPathComp
    

Constructor Summary
public  BshClassPath(String name)
    
public  BshClassPath(String name, URL[] urls)
    

Method Summary
public  voidadd(URL[] urls)
    
public  voidadd(URL url)
    
public  voidaddComponent(BshClassPath bcp)
     Add the specified BshClassPath as a component of our path.
public  voidaddListener(ClassPathListener l)
    
public static  voidaddMappingFeedback(MappingFeedback mf)
    
public  voidaddNameSourceListener(NameSource.Listener listener)
     Implements NameSource Add a listener who is notified upon changes to names in this space.
public static  StringcanonicalizeClassName(String name)
     Create a proper class name from a messy thing. Turn / or \ into ., remove leading class and trailing .class Note: this makes lots of strings...
 voidclassMapping(String msg)
    
public  voidclassPathChanged()
    
 voidendClassMapping()
    
 voiderrorWhileMapping(String s)
    
public  String[]getAllNames()
    
public static  BshClassPathgetBootClassPath()
     Get the boot path including the lib/rt.jar if possible.
public  StringgetClassNameByUnqName(String name)
     Support for super import "*"; Get the full name associated with the unqualified name in this classpath.
public synchronized  ClassSourcegetClassSource(String className)
     Return the source of the specified class which may lie in component path.
public synchronized  SetgetClassesForPackage(String pack)
     Return the set of class names in the specified package including all component paths.
protected  ListgetFullPath()
     Get the full path including component paths.
public  SetgetPackagesSet()
    
public  URL[]getPathComponents()
     Get the path components including any component paths.
public static  BshClassPathgetUserClassPath()
    
public static  URL[]getUserClassPathComponents()
    
public  voidinsureInitialized()
     If the claspath map is not initialized, do it now. If component maps are not do them as well... Random note: Should this be "insure" or "ensure".
protected synchronized  voidinsureInitialized(boolean topPath)
    
public static  booleanisArchiveFileName(String name)
    
public static  booleanisClassFileName(String name)
    
public static  voidmain(String[] args)
    
synchronized  voidmap(URL[] urls)
    
synchronized  voidmap(URL url)
    
 voidnameSpaceChanged()
    
 voidnotifyListeners()
    
public static  CollectionremoveInnerClassNames(Collection col)
    
public  voidremoveListener(ClassPathListener l)
    
static  String[]searchJarForClasses(URL jar)
    
public synchronized  voidsetClassSource(String className, ClassSource cs)
     Explicitly set a class source.
public  voidsetPath(URL[] urls)
    
public static  String[]splitClassname(String classname)
    
 voidstartClassMapping()
    
public  StringtoString()
    
static  String[]traverseDirForClasses(File dir)
    
static  ListtraverseDirForClassesAux(File topDir, File dir)
    

Field Detail
bootClassPath
static BshClassPath bootClassPath(Code)



listeners
Vector listeners(Code)



mappingFeedbackListener
static MappingFeedback mappingFeedbackListener(Code)
only allow one for now



name
String name(Code)



nameSourceListeners
List nameSourceListeners(Code)



userClassPath
static BshClassPath userClassPath(Code)



userClassPathComp
static URL[] userClassPathComp(Code)
The user classpath from system property java.class.path




Constructor Detail
BshClassPath
public BshClassPath(String name)(Code)



BshClassPath
public BshClassPath(String name, URL[] urls)(Code)




Method Detail
add
public void add(URL[] urls)(Code)



add
public void add(URL url) throws IOException(Code)



addComponent
public void addComponent(BshClassPath bcp)(Code)
Add the specified BshClassPath as a component of our path. Changes in the bcp will be reflected through us.



addListener
public void addListener(ClassPathListener l)(Code)



addMappingFeedback
public static void addMappingFeedback(MappingFeedback mf)(Code)



addNameSourceListener
public void addNameSourceListener(NameSource.Listener listener)(Code)
Implements NameSource Add a listener who is notified upon changes to names in this space.



canonicalizeClassName
public static String canonicalizeClassName(String name)(Code)
Create a proper class name from a messy thing. Turn / or \ into ., remove leading class and trailing .class Note: this makes lots of strings... could be faster.



classMapping
void classMapping(String msg)(Code)



classPathChanged
public void classPathChanged()(Code)



endClassMapping
void endClassMapping()(Code)



errorWhileMapping
void errorWhileMapping(String s)(Code)



getAllNames
public String[] getAllNames()(Code)



getBootClassPath
public static BshClassPath getBootClassPath() throws ClassPathException(Code)
Get the boot path including the lib/rt.jar if possible.



getClassNameByUnqName
public String getClassNameByUnqName(String name) throws ClassPathException(Code)
Support for super import "*"; Get the full name associated with the unqualified name in this classpath. Returns either the String name or an AmbiguousName object encapsulating the various names.



getClassSource
public synchronized ClassSource getClassSource(String className)(Code)
Return the source of the specified class which may lie in component path.



getClassesForPackage
public synchronized Set getClassesForPackage(String pack)(Code)
Return the set of class names in the specified package including all component paths.



getFullPath
protected List getFullPath()(Code)
Get the full path including component paths. (component paths listed first, in order) Duplicate path components are removed.



getPackagesSet
public Set getPackagesSet()(Code)
Get a list of all of the known packages



getPathComponents
public URL[] getPathComponents()(Code)
Get the path components including any component paths.



getUserClassPath
public static BshClassPath getUserClassPath() throws ClassPathException(Code)
A BshClassPath initialized to the user path from java.class.path



getUserClassPathComponents
public static URL[] getUserClassPathComponents() throws ClassPathException(Code)



insureInitialized
public void insureInitialized()(Code)
If the claspath map is not initialized, do it now. If component maps are not do them as well... Random note: Should this be "insure" or "ensure". I know I've seen "ensure" used in the JDK source. Here's what Webster has to say: Main Entry:ensure Pronunciation:in-'shur Function:transitive verb Inflected Form(s):ensured; ensuring : to make sure, certain, or safe : GUARANTEE synonyms ENSURE, INSURE, ASSURE, SECURE mean to make a thing or person sure. ENSURE, INSURE, and ASSURE are interchangeable in many contexts where they indicate the making certain or inevitable of an outcome, but INSURE sometimes stresses the taking of necessary measures beforehand, and ASSURE distinctively implies the removal of doubt and suspense from a person's mind. SECURE implies action taken to guard against attack or loss.



insureInitialized
protected synchronized void insureInitialized(boolean topPath)(Code)

Parameters:
  topPath - indicates that this is the top level classpathcomponent and it should send the startClassMapping message



isArchiveFileName
public static boolean isArchiveFileName(String name)(Code)



isClassFileName
public static boolean isClassFileName(String name)(Code)



main
public static void main(String[] args) throws Exception(Code)



map
synchronized void map(URL[] urls)(Code)
call map(url) for each url in the array



map
synchronized void map(URL url) throws IOException(Code)



nameSpaceChanged
void nameSpaceChanged()(Code)
Fire the NameSourceListeners



notifyListeners
void notifyListeners()(Code)



removeInnerClassNames
public static Collection removeInnerClassNames(Collection col)(Code)
Return a new collection without any inner class names



removeListener
public void removeListener(ClassPathListener l)(Code)



searchJarForClasses
static String[] searchJarForClasses(URL jar) throws IOException(Code)
Get the class file entries from the Jar



setClassSource
public synchronized void setClassSource(String className, ClassSource cs)(Code)
Explicitly set a class source. This is used for generated classes, but could potentially be used to allow a user to override which version of a class from the classpath is located.



setPath
public void setPath(URL[] urls)(Code)



splitClassname
public static String[] splitClassname(String classname)(Code)
Split class name into package and name



startClassMapping
void startClassMapping()(Code)



toString
public String toString()(Code)



traverseDirForClasses
static String[] traverseDirForClasses(File dir) throws IOException(Code)



traverseDirForClassesAux
static List traverseDirForClassesAux(File topDir, File dir) throws IOException(Code)



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.