Java Doc for JavaFactory.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » services » compiler » 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 DBMS » db derby 10.2 » org.apache.derby.iapi.services.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.services.compiler.JavaFactory

All known Subclasses:   org.apache.derby.impl.services.bytecode.BCJava,
JavaFactory
public interface JavaFactory (Code)
JavaFactory provides generators for Java constructs. Once Java constructs have been connected into a complete class definition, the class can be generated from them. The generated class is created as a byte-code array that can then be loaded by a class loader or, in our case, the class utilities wrapper around our special class loader.

Each method shows the equivalent Java in the line starting "Java:" in the header comment. Items in the java code that begin with # refer to parameters used in constructing the object. So, for example, newReturnStatement takes a parameter named value; its Java code is: Java: return #value;

This represents the fact that newReturnStatement returns a object that represents a return statement that returns the value represented by the parameter named value.

REVISIT: when StandardException is moved to BasicServices, all of these want to support it so they can throw real NotImplementedYet exceptions. It is expected that alot of this interface can be not-implemented for engines that do not need this complete treatment of the language.

Known Java constructs missing from this interface include:

  • array initializers
  • ,-lists of statements in for segments
  • accessing a field of the current object or class without including this or the class name
  • declaring a list of variables against one type
  • conversions/coercions/promotions of types
  • empty statement
  • labeled statement
  • switch statement
  • break, continue statements
  • "super" expression (akin to the "this" expression).
  • operations on multi-dimensional arrays

This interface also does not do real compilation -- there are no checks for things like initialization before use of variables, inclusion of catchs on throws, dead code, etc. Its purpose is to let other parts of the system piece together what they know is valid code and get bytecode out of doing that.

Also, implementations will require that the constructs be built appropriately or they may fail to produce a valid class. For example, newStaticMethodCall must be used to call static methods only, not non-static local instance methods.

Implementations may be more, or less strict. You are best off assuming you have to piece together each java construct and be as explicit as possible. So, constructors must be created with newConstructor, not newMethodBuilder; constructors must include the explicit call to super(...) or this(...), as their first statement; all methods and constructors must contain a final return statement at the end of their code path(s). Method calls will derive the method to call based on the type of the argument, so you must cast arguments as the system will not search for a close method and coerce arguments appropriately. This includes coercing them to be some superclass or interface that they already are.
author:
   ames



Field Summary
final public static  StringJAVA_FACTORY_PROPERTY
    


Method Summary
 ClassBuildernewClassBuilder(ClassFactory cf, String packageName, int modifiers, String className, String superClass)
     a class.

Field Detail
JAVA_FACTORY_PROPERTY
final public static String JAVA_FACTORY_PROPERTY(Code)





Method Detail
newClassBuilder
ClassBuilder newClassBuilder(ClassFactory cf, String packageName, int modifiers, String className, String superClass)(Code)
a class. Once it is created, fields, methods, interfaces, static initialization code, and constructors can be added to it. Java: package #packageName; #modifiers #className extends #superClass { } // modifiers is the | of the JVM constants for // the modifiers such as static, public, etc.
Parameters:
  cf - ClassFactory to be used for class resolution (debug only)and loading of the generated class.
Parameters:
  packageName - the name of the package the class is inincluding the trailing 'dot' if it is not the empty package.Pass the empty package as "".
Parameters:
  modifiers - the | of the Modifierconstants representing the visibility and control of thismethod.
Parameters:
  className - the name of the class or interface
Parameters:
  superClass - the name of the superclass or superinterface the class builder.
See Also:   java.lang.reflect.Modifier



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