Java Doc for Filer.java in  » IDE-Eclipse » jdt » com » sun » mirror » apt » 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 Eclipse » jdt » com.sun.mirror.apt 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.mirror.apt.Filer

All known Subclasses:   org.eclipse.jdt.apt.core.internal.env.FilerImpl,
Filer
public interface Filer (Code)
This interface supports the creation of new files by an annotation processor. Files created in this way will be known to the annotation processing tool implementing this interface, better enabling the tool to manage them. Four kinds of files are distinguished: source files, class files, other text files, and other binary files. The latter two are collectively referred to as auxiliary files.

There are two distinguished locations (subtrees within the file system) where newly created files are placed: one for new source files, and one for new class files. (These might be specified on a tool's command line, for example, using flags such as -s and -d.) Auxiliary files may be created in either location.

During each run of an annotation processing tool, a file with a given pathname may be created only once. If that file already exists before the first attempt to create it, the old contents will be deleted. Any subsequent attempt to create the same file during a run will fail.
author:
   Joseph D. Darcy
author:
   Scott Seligman
version:
   1.1 04/01/26
since:
   1.5


Inner Class : enum Location



Method Summary
 OutputStreamcreateBinaryFile(Location loc, String pkg, File relPath)
     Creates a new binary file, and returns a stream for writing to it. The file is located along with either the newly created source or newly created binary files.
 OutputStreamcreateClassFile(String name)
     Creates a new class file, and returns a stream for writing to it.
 PrintWritercreateSourceFile(String name)
     Creates a new source file and returns a writer for it. The file's name and path (relative to the root of all newly created source files) is based on the type to be declared in that file. If more than one type is being declared, the name of the principal top-level type (the public one, for example) should be used.

The used to encode the file is determined by the implementation. An annotation processing tool may have an -encoding flag or the like for specifying this.

 PrintWritercreateTextFile(Location loc, String pkg, File relPath, String charsetName)
     Creates a new text file, and returns a writer for it. The file is located along with either the newly created source or newly created binary files.



Method Detail
createBinaryFile
OutputStream createBinaryFile(Location loc, String pkg, File relPath) throws IOException(Code)
Creates a new binary file, and returns a stream for writing to it. The file is located along with either the newly created source or newly created binary files. It may be named relative to some package (as are source and binary files), and from there by an arbitrary pathname. In a loose sense, the pathname of the new file will be the concatenation of loc, pkg, and relPath.
Parameters:
  loc - location of the new file
Parameters:
  pkg - package relative to which the file should be named,or the empty string if none
Parameters:
  relPath - final pathname components of the file a stream for writing to the new file
throws:
  IOException - if the file cannot be created



createClassFile
OutputStream createClassFile(String name) throws IOException(Code)
Creates a new class file, and returns a stream for writing to it. The file's name and path (relative to the root of all newly created class files) is based on the name of the type being written.
Parameters:
  name - canonical (fully qualified) name of the type being written a stream for writing to the new file
throws:
  IOException - if the file cannot be created



createSourceFile
PrintWriter createSourceFile(String name) throws IOException(Code)
Creates a new source file and returns a writer for it. The file's name and path (relative to the root of all newly created source files) is based on the type to be declared in that file. If more than one type is being declared, the name of the principal top-level type (the public one, for example) should be used.

The used to encode the file is determined by the implementation. An annotation processing tool may have an -encoding flag or the like for specifying this. It will typically use the platform's default encoding if none is specified.
Parameters:
  name - canonical (fully qualified) name of the principal typebeing declared in this file a writer for the new file
throws:
  IOException - if the file cannot be created




createTextFile
PrintWriter createTextFile(Location loc, String pkg, File relPath, String charsetName) throws IOException(Code)
Creates a new text file, and returns a writer for it. The file is located along with either the newly created source or newly created binary files. It may be named relative to some package (as are source and binary files), and from there by an arbitrary pathname. In a loose sense, the pathname of the new file will be the concatenation of loc, pkg, and relPath.

A for encoding the file may be provided. If none is given, the charset used to encode source files (see Filer.createSourceFile(String) ) will be used.
Parameters:
  loc - location of the new file
Parameters:
  pkg - package relative to which the file should be named,or the empty string if none
Parameters:
  relPath - final pathname components of the file
Parameters:
  charsetName - the name of the charset to use, or null if noneis being explicitly specified a writer for the new file
throws:
  IOException - if the file cannot be created




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