Java Doc for StandardJavaFileManager.java in  » 6.0-JDK-Modules-sun » javac-compiler » javax » tools » 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 » 6.0 JDK Modules sun » javac compiler » javax.tools 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.tools.StandardJavaFileManager

All known Subclasses:   com.sun.tools.javac.util.JavacFileManager,
StandardJavaFileManager
public interface StandardJavaFileManager extends JavaFileManager(Code)
File manager based on . A common way to obtain an instance of this class is using , for example:
 JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
  DiagnosticCollector   diagnostics =
 new 
  DiagnosticCollector()  ;
 StandardJavaFileManager fm = compiler.getStandardFileManager(diagnostics, null, null);
 
This file manager creates file objects representing regular , , or entries in similar file system based containers. Any file object returned from a file manager implementing this interface must observe the following behavior:
  • File names need not be canonical.
  • For file objects representing regular files
    • the method is equivalent to ,
    • the method is equivalent to ,
    • the methods , , and must succeed if the following would succeed (ignoring encoding issues):
      new 
       (new 
       (
       .
       ()))
    • and the methods , and must succeed if the following would succeed (ignoring encoding issues):
      new 
       (new 
       (
       .
       ()))
  • The returned from
    • must be (have a schema), and
    • must have a which can be resolved without any process-specific context such as the current directory (file names must be absolute).
According to these rules, the following URIs, for example, are allowed:
  • file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java
  • jar:///C:/Documents%20and%20Settings/UncleBob/lib/vendorA.jar!com/vendora/LibraryClass.class
Whereas these are not (reason in parentheses):
  • file:BobsApp/Test.java (the file name is relative and depend on the current directory)
  • jar:lib/vendorA.jar!com/vendora/LibraryClass.class (the first half of the path depends on the current directory, whereas the component after ! is legal)
  • Test.java (this URI depends on the current directory and does not have a schema)
  • jar:///C:/Documents%20and%20Settings/UncleBob/BobsApp/../lib/vendorA.jar!com/vendora/LibraryClass.class (the path is not normalized)

author:
   Peter von der Ahé
since:
   1.6




Method Summary
 Iterable<? extends JavaFileObject>getJavaFileObjects(File... files)
     Gets file objects representing the given files.
 Iterable<? extends JavaFileObject>getJavaFileObjects(String... names)
     Gets file objects representing the given file names.
 Iterable<? extends JavaFileObject>getJavaFileObjectsFromFiles(Iterable<? extends File> files)
     Gets file objects representing the given files.
 Iterable<? extends JavaFileObject>getJavaFileObjectsFromStrings(Iterable<String> names)
     Gets file objects representing the given file names.
 Iterable<? extends File>getLocation(Location location)
     Gets the path associated with the given location.
 booleanisSameFile(FileObject a, FileObject b)
     Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.
 voidsetLocation(Location location, Iterable<? extends File> path)
     Associates the given path with the given location.



Method Detail
getJavaFileObjects
Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)(Code)
Gets file objects representing the given files. Convenience method equivalent to:
 getJavaFileObjectsFromFiles(
 (files))
 

Parameters:
  files - an array of files a list of file objects
throws:
  IllegalArgumentException - if the array of files includesa directory
throws:
  NullPointerException - if the given array contains nullelements



getJavaFileObjects
Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)(Code)
Gets file objects representing the given file names. Convenience method equivalent to:
 getJavaFileObjectsFromStrings(
 (names))
 

Parameters:
  names - a list of file names a list of file objects
throws:
  IllegalArgumentException - if the array of file namesincludes a directory
throws:
  NullPointerException - if the given array contains nullelements



getJavaFileObjectsFromFiles
Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)(Code)
Gets file objects representing the given files.
Parameters:
  files - a list of files a list of file objects
throws:
  IllegalArgumentException - if the list of files includesa directory



getJavaFileObjectsFromStrings
Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)(Code)
Gets file objects representing the given file names.
Parameters:
  names - a list of file names a list of file objects
throws:
  IllegalArgumentException - if the list of file namesincludes a directory



getLocation
Iterable<? extends File> getLocation(Location location)(Code)
Gets the path associated with the given location.
Parameters:
  location - a location a list of files or null if this location has noassociated path
See Also:   StandardJavaFileManager.setLocation



isSameFile
boolean isSameFile(FileObject a, FileObject b)(Code)
Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.
Parameters:
  a - a file object
Parameters:
  b - a file object true if the given file objects represent the samecanonical file or zip file entry; false otherwise
throws:
  IllegalArgumentException - if either of the argumentswere created with another file manager implementation



setLocation
void setLocation(Location location, Iterable<? extends File> path) throws IOException(Code)
Associates the given path with the given location. Any previous value will be discarded.
Parameters:
  location - a location
Parameters:
  path - a list of files, if null use the defaultpath for this location
See Also:   StandardJavaFileManager.getLocation
throws:
  IllegalArgumentException - if location is an outputlocation and path does not contain exactly one element
throws:
  IOException - if location is an output location and pathdoes not represent an existing directory



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.