05 Dec 1999 08:34:32 UTC
- Distribution: B-JVM-Jasmin
- Module version: 0.02
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (0 / 66 / 2)
- KwaliteeBus factor: 0
- % Coverage
- License: unknown
- Activity24 month
- Download (43.19KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- SEE ALSO
- DETAILED DOCUMENTATION
B::JVM::Jasmin::CompileState - Internal package used by B::JVM::Jasmin to keep state of compilation
use B::JVM::Jasmin::CompileState; my $state = new B::JVM::Jasmin::CompileState([HASHREF]);
This class is used to store the internal state of the compiler as it runs. Certain global information must be accounted for, and instead of making a bunch of global variables, I thought it would be better to keep track of this via a sub-package.
Bradley M. Kuhn, email@example.com, http://www.ebb.org/bkuhn
Copyright (C) 1999, Bradley M. Kuhn, All Rights Reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the LICENSE file that was shipped with this distribution.
perl(1), jasmin(1), B::JVM::Jasmin(3).
Version number of B::JVM::Jasmin::CompileState. It should always match the version of B::JVM::Jasmin
Canonical @ISA array, derives from nothing
Used for error reporting
Used to do some operations on files
used for creating lexically scoped file handles
Needed for creating emitter objects for output
Creates a new object of the class. First, it checks for the validity of the keys of the given initialization package (valid keys are kept in @validUserParameters), and if everything checks out, it sets up a few defaults if none were given and returns the blessed object.
Accepted User Parameters:
The name to be used for the Java class that will correspond to the "main::" package. Defaults to "Main" if none is given.
This is the current package being compiled. Should be updated by the user using the setCurrentPackage method. There is really no need to initialize it until compilation starts. Consequently, the value defaults to undef.
A directory to use for creation of output files. Defaults to the current working directory.
If true, intermediate files that are generated during the compilation process are kept for user inspection.
usage: $obj->createNewFile($packageName, [$className])
Creates a new file entry in the compiler state object and opens a new file handle for use when writing out jasmin files. If the file has already been created, nothing is done. This is typically called whenever a new package is discovered, so that a seperate class file can be generated for that package (class) in True Java Style (TM) :)
returns the emitter object associated with the given package, PACAKGE_NAME. If PACKAGE_NAME is missing, then the emitter object of the currentPackage is returned
Set the current method to be $methodName
Set the current package to be $packageName
Clear the current method name stored
Return the current method
Default destructor for the object
Module Install Instructions
To install B::JVM::Jasmin, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install B::JVM::Jasmin
For more information on module installation, please visit the detailed CPAN module installation guide.