The overall structure of a compiled class is quite simple. Indeed, unlike natively
compiled applications, a compiled class retains the structural information
and almost all the symbols from the source code. In fact a compiled class
contains:
• A section describing the modifiers (such as public or private), the
name, the super class, the interfaces and the annotations of the class.
• One section per field declared in this class. Each section describes the
modifiers, the name, the type and the annotations of a field.
• One section per method and constructor declared in this class. Each section
describes the modifiers, the name, the return and parameter types,
and the annotations of a method. It also contains the compiled code of
the method, in the form of a sequence of Java bytecode instructions.
There are however some differences between source and compiled classes:
• A compiled class describes only one class, while a source file can contain
several classes. For instance a source file describing a class with one inner
class is compiled in two class files: one for the main class and one for the
inner class. However the main class file contains references to its inner
classes, and inner classes defined inside methods contain a reference to
their enclosing method.
• A compiled class does not contain comments, of course, but can contain
class, field, method and code attributes that can be used to associate
additional information to these elements. Since the introduction of annotations
in Java 5, which can be used for the same purpose, attributes
have become mostly useless.
• A compiled class does not contain a package and import section, so all
type names must be fully qualified.
Another very important structural difference is that a compiled class contains
a constant pool section. This pool is an array containing all the numeric, string
and type constants that appear in the class. These constants are defined only
once, in the constant pool section, and are referenced by their index in all other
sections of the class file. Hopefully ASM hides all the details related to the
constant pool, so you will not have to bother about it.
- 大小: 65.5 KB
分享到:
相关推荐
6. Compiled templates (for cache and Smarty internal use): ./templates_c 7. Dump of MySQL database is in ./sql/*.sql file. 8. Website images are located in ./*images directory. 9. Shipping modules ...
For those interested in diving deeper into GWT, this chapter explores the underlying mechanisms, including bootstrapping, compiled code structure, and output files produced by the compiler. ...
ABL is both a compiled and an interpreted language that executes in a run-time engine. The documentation refers to this run-time engine as the ABL Virtual Machine (AVM). When the documentation refers ...
Even faster Key/Value store nosql embedded database engine utilizing the new MGIndex data structure with MurMur2 Hashing and WAH Bitmap indexes for duplicates. See Also More like this More by this...
Structure Dissect: Fixed the popupmenu "change type" so it now affects all selected entries instead of just the first PointerOrPointee window: Fix the debug pointer or pointee window button text when ...
- **Compiling and Running the Program**: Detailed instructions on compiling the source code using the chosen compiler and running the compiled program. - **Understanding Errors and Warnings**: ...
The MCR is a standalone set of shared libraries that enables the execution of compiled Matlab applications or components on computers that do not have Matlab installed. The MCR installer can be ...
To run the compiled program: ```bash ./hello ``` #### C Basic Syntax C has a specific syntax that must be followed to write valid programs. ##### Tokens in C Tokens are the smallest units of a C ...
apks are nothing more than a zip file containing resources and compiled java. If you were to simply unzip an apk like so, you would be left with files such as classes.dex and resources.arsc. $ unzip...
PEP 487: Simpler customization of class creation PEP 487: Descriptor Protocol Enhancements PEP 519: Adding a file system path protocol PEP 495: Local Time Disambiguation PEP 529: Change Windows ...
[C++ Error] DragDropFile.hpp(178): E2450 Undefined structure '_FILEDESCRIPTORW' [C++ Error] DropSource.hpp(135): E2076 Overloadable operator expected I have not been able to reproduce these ...
<END><br>46,FldrView.zip The Folderview ActiveX Control mimics the behaviour of the Windows Explorer Treeview showing the tree structure of the files and folders and other items in the shell's ...
- 例如:`(defclass person () ((name :accessor person-name)))` 定义了一个Person类。 #### 10.2 Generic Functions 泛型函数 - CLOS中的泛型函数可以根据不同的类实例调用不同的方法。 - 例如:`(defgeneric ...
immediate and easy use by a wide class of users. With this goal, it seems natural to provide the ability to use any remote HOST as if it had been dialed up from a TTY (teletype) terminal. ...
;;;;;;;;... 1.... 2.... 3.... 4.... 5.... 6.... The syntax of the file is extremely simple.... Section headers (e.g.... at runtime.... There is no name validation.... (e.g.... previously set variable or directive (e.g....
32)..Changed: Descriptions of EurekaLog project options now list corresponding property names of TEurekaModuleOptions class. 33)..Changed: Default template of ...