Java Doc for JStructure.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.JType
      org.exolab.javasource.JStructure

All known Subclasses:   org.exolab.javasource.JAnnotationType,  org.exolab.javasource.JInterface,  org.exolab.javasource.AbstractJClass,
JStructure
abstract public class JStructure extends JType implements JAnnotatedElement(Code)
This class represents the basic Java "structure" for a Java source file. This is the base class for JClass and JInterface.
This is a useful utility when creating in memory source code. The code in this package was modelled after the Java Reflection API as much as possible to reduce the learning curve.
author:
   Martin Skopp
author:
   Keith Visco
version:
   $Revision: 6669 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $



Constructor Summary
protected  JStructure(String name)
     Creates a new JStructure with the given name.

Method Summary
final public  voidaddAnnotation(JAnnotation annotation)
    
abstract public  voidaddField(JField jField)
     Adds the given JField to this JStructure.
This method is implemented by subclasses and should only accept the proper fields for the subclass otherwise an IllegalArgumentException will be thrown.
abstract public  voidaddImport(String className)
     Adds the given import to this JStructure.
final protected  voidaddImport(JAnnotation annotation)
     Adds appropriate import for this JAnnotation.
final protected  voidaddImport(JAnnotation[] annotations)
     Adds appropriate imports for each JAnnotation in the given Array.
final protected  voidaddImportInternal(String className)
     Adds the given import to this JStructure.
final public  voidaddInterface(String interfaceName)
     Adds the given interface to the list of interfaces this JStructure inherits method declarations from, and either implements (JClass) or extends (JInterface).
abstract public  voidaddMember(JMember jMember)
     Adds the given JMember to this JStructure.
final protected  JAnnotatedElementHelpergetAnnotatedElementHelper()
     Returns the object managing the annotations for this JStructure.
final public  JAnnotationgetAnnotation(JAnnotationType annotationType)
    
final public  JAnnotation[]getAnnotations()
    
abstract public  JFieldgetField(String name)
     Returns the field with the given name, or null if no field was found with that name.
Parameters:
  name - The name of the field to return.
abstract public  JField[]getFields()
     Returns an array of all the JFields of this JStructure.
final public  StringgetFilename(String destDir)
     Returns the name of the file that this JStructure would be printed to, given a call to JStructure.print(String,String) .
Parameters:
  destDir - the destination directory.
final public  JCommentgetHeader()
     Returns the JComment header to display at the top of the source file for this JStructure, or null if no header was set.
final public  EnumerationgetImports()
     Returns an Enumeration of imported package and class names for this JStructure. The Enumeration of imports.
final protected  intgetInterfaceCount()
     Return the count of the number of Interfaces that have been added to this JStructure.
final public  EnumerationgetInterfaces()
     Returns an Enumeration of interface names that this JStructure inherits from. The Enumeration of interface names for this JStructure.
final public  JDocCommentgetJDocComment()
     Returns the JavaDoc comment for this JStructure.
final public  JModifiersgetModifiers()
     Returns the JModifiers, which allows the qualifiers to be changed.
final public  StringgetPackageName()
     Returns the name of the package that this JStructure is a member of.
final public  booleanhasAnnotations()
    
final public  booleanhasImport(String classname)
     Returns true if the given classname exists in the imports of this JStructure.
final public  booleanisAnnotationPresent(JAnnotationType annotationType)
    
final public  voidprint(String destDir, String lineSeparator)
     Prints the source code for this JStructure to the destination directory.
abstract public  voidprint(JSourceWriter jsw)
     Prints the source code for this JStructure to the given JSourceWriter.
final public  voidprintHeader(JSourceWriter jsw)
     A utility method that prints the header to the given JSourceWriter.
final protected  voidprintImportDeclarations(JSourceWriter jsw)
     A utility method that prints the imports to the given JSourceWriter.
final public  voidprintPackageDeclaration(JSourceWriter jsw)
     A utility method that prints the packageDeclaration to the given JSourceWriter.
final public  JAnnotationremoveAnnotation(JAnnotationType annotationType)
    
final public  booleanremoveImport(String className)
     Remove the import of the given class name from this JStucture, returning true if the import was found and removed.
Parameters:
  className - Name of the class to remove the import of.
final public  voidsetHeader(JComment comment)
     Sets the header comment for this JStructure.
final public  StringtoString()
    
Returns the String representation of this JType.


Constructor Detail
JStructure
protected JStructure(String name)(Code)
Creates a new JStructure with the given name.
Parameters:
  name - The name of the JStructure.




Method Detail
addAnnotation
final public void addAnnotation(JAnnotation annotation)(Code)



addField
abstract public void addField(JField jField)(Code)
Adds the given JField to this JStructure.
This method is implemented by subclasses and should only accept the proper fields for the subclass otherwise an IllegalArgumentException will be thrown. For example a JInterface will only accept static fields.
Parameters:
  jField - The JField to add.



addImport
abstract public void addImport(String className)(Code)
Adds the given import to this JStructure. Note: You cannot import from the "default package," so imports with no package are ignored.
Parameters:
  className - Name of the class to import.



addImport
final protected void addImport(JAnnotation annotation)(Code)
Adds appropriate import for this JAnnotation.
Parameters:
  annotation - A JAnnotation for which we want to add an import tothis JStructure.



addImport
final protected void addImport(JAnnotation[] annotations)(Code)
Adds appropriate imports for each JAnnotation in the given Array.
Parameters:
  annotations - An Array of JAnnotation; we want to add an import tothis JStructure for each JAnnotation in the Array.



addImportInternal
final protected void addImportInternal(String className)(Code)
Adds the given import to this JStructure. Given class name should not be null or empty.
Note: You cannot import from the "default package," so imports with no package are ignored.
Parameters:
  className - Name of the class to import.



addInterface
final public void addInterface(String interfaceName)(Code)
Adds the given interface to the list of interfaces this JStructure inherits method declarations from, and either implements (JClass) or extends (JInterface).
Parameters:
  interfaceName - The name of the interface to "inherit" methoddeclarations from.



addMember
abstract public void addMember(JMember jMember)(Code)
Adds the given JMember to this JStructure.
This method is implemented by subclasses and should only accept the proper types for the subclass otherwise an IllegalArgumentException will be thrown.
Parameters:
  jMember - The JMember to add to this JStructure.



getAnnotatedElementHelper
final protected JAnnotatedElementHelper getAnnotatedElementHelper()(Code)
Returns the object managing the annotations for this JStructure. The object managing the annotations for this JStructure.



getAnnotation
final public JAnnotation getAnnotation(JAnnotationType annotationType)(Code)



getAnnotations
final public JAnnotation[] getAnnotations()(Code)



getField
abstract public JField getField(String name)(Code)
Returns the field with the given name, or null if no field was found with that name.
Parameters:
  name - The name of the field to return. The field with the given name, or null if no field was found withthe given name.



getFields
abstract public JField[] getFields()(Code)
Returns an array of all the JFields of this JStructure. An array of all the JFields of this JStructure.



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



getHeader
final public JComment getHeader()(Code)
Returns the JComment header to display at the top of the source file for this JStructure, or null if no header was set. The JComment header or null if none exists.



getImports
final public Enumeration getImports()(Code)
Returns an Enumeration of imported package and class names for this JStructure. The Enumeration of imports. May be empty but will not be null.



getInterfaceCount
final protected int getInterfaceCount()(Code)
Return the count of the number of Interfaces that have been added to this JStructure. The count of the number of Interfaces that have been added tothis JStructure.



getInterfaces
final public Enumeration getInterfaces()(Code)
Returns an Enumeration of interface names that this JStructure inherits from. The Enumeration of interface names for this JStructure. May beempty but will not be null.



getJDocComment
final public JDocComment getJDocComment()(Code)
Returns the JavaDoc comment for this JStructure. The JDocComment for this JStructure.



getModifiers
final public JModifiers getModifiers()(Code)
Returns the JModifiers, which allows the qualifiers to be changed. The JModifiers for this JStructure.



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



hasAnnotations
final public boolean hasAnnotations()(Code)



hasImport
final public boolean hasImport(String classname)(Code)
Returns true if the given classname exists in the imports of this JStructure.
Parameters:
  classname - The class name to check for True if the given classname exists in the imports list.



isAnnotationPresent
final public boolean isAnnotationPresent(JAnnotationType annotationType)(Code)



print
final public void print(String destDir, String lineSeparator)(Code)
Prints the source code for this JStructure to the destination directory. Subdirectories will be created if necessary for the package.
Parameters:
  destDir - Directory name to use as the root directory for all output.
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
abstract public void print(JSourceWriter jsw)(Code)
Prints the source code for this JStructure to the given JSourceWriter.
Parameters:
  jsw - The JSourceWriter to print to.



printHeader
final public void printHeader(JSourceWriter jsw)(Code)
A utility method that prints the header to the given JSourceWriter.
Parameters:
  jsw - The JSourceWriter to print to.



printImportDeclarations
final protected void printImportDeclarations(JSourceWriter jsw)(Code)
A utility method that prints the imports to the given JSourceWriter.
Parameters:
  jsw - The JSourceWriter to print to.



printPackageDeclaration
final public void printPackageDeclaration(JSourceWriter jsw)(Code)
A utility method that prints the packageDeclaration to the given JSourceWriter.
Parameters:
  jsw - The JSourceWriter to print to.



removeAnnotation
final public JAnnotation removeAnnotation(JAnnotationType annotationType)(Code)



removeImport
final public boolean removeImport(String className)(Code)
Remove the import of the given class name from this JStucture, returning true if the import was found and removed.
Parameters:
  className - Name of the class to remove the import of. If the import was previously part of this JStructure, falseotherwise.



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



toString
final public String toString()(Code)

Returns the String representation of this JType.



Fields inherited from org.exolab.javasource.JType
final public static JPrimitiveType BOOLEAN(Code)(Java Doc)
final public static JPrimitiveType BYTE(Code)(Java Doc)
final public static JPrimitiveType CHAR(Code)(Java Doc)
final public static JPrimitiveType DOUBLE(Code)(Java Doc)
final public static JPrimitiveType FLOAT(Code)(Java Doc)
final public static JPrimitiveType INT(Code)(Java Doc)
final public static JPrimitiveType LONG(Code)(Java Doc)
final public static JPrimitiveType SHORT(Code)(Java Doc)

Methods inherited from org.exolab.javasource.JType
final public String getLocalName()(Code)(Java Doc)
final public String getName()(Code)(Java Doc)
final public boolean isArray()(Code)(Java Doc)
final public boolean isPrimitive()(Code)(Java Doc)
protected void setName(String name)(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.