Java Doc for JCompUnit.java in  » Database-ORM » castor » org » exolab » javasource » 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 » Database ORM » castor » org.exolab.javasource 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.exolab.javasource.JCompUnit

JCompUnit
final public class JCompUnit (Code)
A representation of the Java Source code for a Java compilation unit. This is a useful utility when creating in memory source code. This package was modelled after the Java Reflection API as much as possible to reduce the learning curve.
author:
   Gary Shea
version:
   $Revision: 6669 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $



Constructor Summary
public  JCompUnit(String packageName, String fileName)
     Creates a new JCompUnit.
Parameters:
  packageName - The name of the package for this JCompUnit.
public  JCompUnit(JClass jClass)
     Creates a new JCompUnit with the given JClass (which must have been created with either a full class name or package/local name) as the public class.
public  JCompUnit(JInterface jInterface)
     Creates a new JCompUnit with the given JInterface as public interface.

Method Summary
public  voidaddClass(JClass jClass)
     Adds a JClass to be printed in this file.
public  voidaddInterface(JInterface jInterface)
     Adds a JInterface to be printed in this file.
public  voidaddStructure(JStructure jStructure)
     Adds the given JStructure (either a JInterface or a JClass) to this JCompUnit.
public  StringgetFilename(String destDir)
     Returns the name of the file that this JCompUnit would be printed to, given a call to JCompUnit.print(String,String) , or if destDir is null, a call to JCompUnit.print() .
Parameters:
  destDir - The destination directory.
public  SortedSetgetImports()
     Returns a array of String containing all imported classes/packages, also imports within the same package of this object.
public  StringgetPackageName()
     Returns the name of the package that this JCompUnit is a member of.
public  voidprint()
     Prints the source code for this JClass in the current directory with the default line seperator of the the runtime platform.
public  voidprint(String destDir)
     Prints the source code for this JClass with the default line seperator of the the runtime platform.
public  voidprint(String destDir, String lineSeparator)
     Prints the source code for this JCompUnit using the provided root directory and line separator.
Parameters:
  destDir - The destination directory to use as the root directory forsource generation.
Parameters:
  lineSeparator - The line separator to use at the end of each line.
public  voidprint(JSourceWriter jsw)
     Prints the source code for this JClass to the provided JSourceWriter.
public  voidprintStructures(JSourceWriter jsw, boolean printPublic)
     Print the source code for the contained JClass objects.
public  voidsetHeader(JComment comment)
     Sets the header comment for this JCompUnit.


Constructor Detail
JCompUnit
public JCompUnit(String packageName, String fileName)(Code)
Creates a new JCompUnit.
Parameters:
  packageName - The name of the package for this JCompUnit. If packageName isnull or empty, no 'package' line will be generated.
Parameters:
  fileName - The name of the file to which this JCompUnit will be written.



JCompUnit
public JCompUnit(JClass jClass)(Code)
Creates a new JCompUnit with the given JClass (which must have been created with either a full class name or package/local name) as the public class. Package and file name are taken from jClass.
Parameters:
  jClass - The public class for this JCompUnit.



JCompUnit
public JCompUnit(JInterface jInterface)(Code)
Creates a new JCompUnit with the given JInterface as public interface. Package and file name are taken from jInterface.
Parameters:
  jInterface - The public interface for this JCompUnit.




Method Detail
addClass
public void addClass(JClass jClass)(Code)
Adds a JClass to be printed in this file.
Parameters:
  jClass - The JClass to be printed in this file.



addInterface
public void addInterface(JInterface jInterface)(Code)
Adds a JInterface to be printed in this file.
Parameters:
  jInterface - The JInterface to be printed in this file.



addStructure
public void addStructure(JStructure jStructure)(Code)
Adds the given JStructure (either a JInterface or a JClass) to this JCompUnit.
Parameters:
  jStructure - The JStructure to add.



getFilename
public String getFilename(String destDir)(Code)
Returns the name of the file that this JCompUnit would be printed to, given a call to JCompUnit.print(String,String) , or if destDir is null, a call to JCompUnit.print() .
Parameters:
  destDir - The destination directory. This may be null. The name of the file that this JCompUnit would be printed to.



getImports
public SortedSet getImports()(Code)
Returns a array of String containing all imported classes/packages, also imports within the same package of this object. A array of String containing all import classes/packages, alsoimports within the same package of this object.



getPackageName
public String getPackageName()(Code)
Returns the name of the package that this JCompUnit is a member of. The name of the package that this JCompUnit is a member of, ornull if there is no current package name defined.



print
public void print()(Code)
Prints the source code for this JClass in the current directory with the default line seperator of the the runtime platform.
See Also:   JCompUnit.print(String,String)



print
public void print(String destDir)(Code)
Prints the source code for this JClass with the default line seperator of the the runtime platform.
Parameters:
  destDir - The destination directory to use as the root directory forsource generation.
See Also:   JCompUnit.print(String,String)



print
public void print(String destDir, String lineSeparator)(Code)
Prints the source code for this JCompUnit using the provided root directory and line separator.
Parameters:
  destDir - The destination directory to use as the root directory forsource generation.
Parameters:
  lineSeparator - The line separator to use at the end of each line. If null,then the default line separator for the runtime platform will be used.



print
public void print(JSourceWriter jsw)(Code)
Prints the source code for this JClass to the provided JSourceWriter.
Parameters:
  jsw - The JSourceWriter to print to.



printStructures
public void printStructures(JSourceWriter jsw, boolean printPublic)(Code)
Print the source code for the contained JClass objects.
Parameters:
  jsw - The JSourceWriter to print to.
Parameters:
  printPublic - If true, print only public classes; if false, print onlynon-public classes.



setHeader
public void setHeader(JComment comment)(Code)
Sets the header comment for this JCompUnit.
Parameters:
  comment - The comment to display at the top of the source file when printed.



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.