B::JVM::Jasmin::CompileState

B::JVM::Jasmin::CompileState is an internal package used by B::JVM::Jasmin to keep state of compilation.
Download

B::JVM::Jasmin::CompileState Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Bradley M. Kuhn
  • Publisher web site:
  • http://search.cpan.org/~bkuhn/B-JVM-Jasmin-0.02/lib/B/JVM/Utils.pm

B::JVM::Jasmin::CompileState Tags


B::JVM::Jasmin::CompileState Description

B::JVM::Jasmin::CompileState is an internal package used by B::JVM::Jasmin to keep state of compilation. B::JVM::Jasmin::CompileState is an internal package used by B::JVM::Jasmin to keep state of compilation.SYNOPSIS use B::JVM::Jasmin::CompileState; my $state = new B::JVM::Jasmin::CompileState();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.B::JVM::Jasmin::CompileState Package Variables$VERSIONVersion number of B::JVM::Jasmin::CompileState. It should always match the version of B::JVM::Jasmin@ISACanonical @ISA array, derives from nothingModules used by B::JVM::Jasmin::CompileStateCarpUsed for error reportingFile::Spec::FunctionsUsed to do some operations on filesIO::Fileused for creating lexically scoped file handlesB::JVM::Jasmin::EmitNeeded for creating emitter objects for outputMethods in B::JVM::Jasmin::CompileStateB::JVM::Jasmin::CompileState::newusage: B::JVM::Jasmin::CompileState::new(HASHREF)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:mainClassNameThe name to be used for the Java class that will correspond to the "main::" package. Defaults to "Main" if none is given.currentPackageThis 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.outputDirectoryA directory to use for creation of output files. Defaults to the current working directory.keepIntermediateFilesIf true, intermediate files that are generated during the compilation process are kept for user inspection.B::JVM::Jasmin::CompileState::createNewFileusage: $obj->createNewFile($packageName, )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) :)B::JVM::Jasmin::CompileState::emitusage: $obj->emit()returns the emitter object associated with the given package, PACAKGE_NAME. If PACKAGE_NAME is missing, then the emitter object of the currentPackage is returnedB::JVM::Jasmin::CompileState::setCurrentMethodusage: $obj->setCurrentMethod($methodName)Set the current method to be $methodNameB::JVM::Jasmin::CompileState::setCurrentPackageusage: $obj->setCurrentPackage($packageName)Set the current package to be $packageNameB::JVM::Jasmin::CompileState::clearCurrentMethodusage: $obj->clearCurrentMethod()Clear the current method name storedB::JVM::Jasmin::CompileState::getCurrentMethodusage: $obj->getCurrentMethod()Return the current methodB::JVM::Jasmin::CompileState::DESTORYusage: $obj->DESTROY()Default destructor for the object Requirements: · Perl


B::JVM::Jasmin::CompileState Related Software