Information Technology Reference
In-Depth Information
DDL
Syntactic
Analysis
Error Reports
AST
Contextual
Analysis
Error Reports
decorated AST
Code
Rewriting
Bytecode
Error Reports
Altered bytecode
Figure 5.1.
Compiler data flow.
methods to check if a class implements the serializable interface, renaming class
files and checking a method's return type.
At runtime, the name of the protocol is used to dynamically load the proto-
col implementation class and defer code generation and protocol option checking
functionality to it using the following mechanism:
• The name of the protocol contained in the DDL is converted to upper case.
• The package name org.remotej.generated. is prefixed to the protocol
name.
•Theword Protocol is appended to the above.
• The class is dynamically loaded and instantiated using Java's Class class.
Using the above mechanism, a protocol with the name jms
will be converted to org.remotej.generated.JMSProtocol and will
be loaded and instantiated by the ProtocolFactory class using the
Class.forName(className).newInstance() mechanism provided by Java's
Class class. Protocol options are collected by the compiler's parser and are
passed to the protocol implementation for verification and subsequent use in the
code generation phase.
 
Search WWH ::




Custom Search