org.apache.derby.iapi.services.compiler |
|
Java Source File Name | Type | Comment |
ClassBuilder.java | Interface | ClassBuilder is used to construct a java class's byte array
representation.
Limitations:
No checking for language use violations such as invalid modifiers
or duplicate field names.
All classes must have a superclass; java.lang.Object must be
supplied if there is no superclass.
When a class is first created, it has:
- a superclass
- modifiers
- a name
- a package
- no superinterfaces, methods, fields, or constructors
- an empty static initializer
MethodBuilder implementations are required to get code out of the
constructs within their bodies in some manner. |
JavaFactory.java | Interface | 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. |
LocalField.java | Interface | A field within the generated class. |
MethodBuilder.java | Interface | MethodBuilder is used to generate the code for a method.
The code for a method is built in a way that corresponds to the
layout of the stack machine that is the Java Virtual Machine.
Values are pushed on the stack, moved about on the stack
and then popped off the stack by operations such as method
calls. |