Java::JVM::Classfile

Java::JVM::Classfile is a Perl module to parse JVM Classfiles.
Download

Java::JVM::Classfile Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Leon Brocard
  • Publisher web site:
  • http://search.cpan.org/~lbrocard/

Java::JVM::Classfile Tags


Java::JVM::Classfile Description

Java::JVM::Classfile is a Perl module to parse JVM Classfiles. Java::JVM::Classfile is a Perl module to parse JVM Classfiles.SYNOPSIS use Java::JVM::Classfile; my $c = Java::JVM::Classfile->new("HelloWorld.class"); print "Class: " . $c->class . "n"; print "Methods: " . scalar(@{$c->methods}) . "n";The Java Virtual Machine (JVM) is an abstract machine which processes JVM classfiles. Such classfiles contain, broadly speaking, representations of the Java methods and member fields forming the definition of a single class, information to support the exception mechanism and a system for representing additional class attributes. The JVM itself exists primarily to load and link classfiles into the running machine on demand (performed by the Class Loader), represent those classes internally by means of a number of runtime data structures and facilitate execution (a role shared between the Execution Engine (which is responsible for execution of JVM instructions) and the Native Method Interface which allows a Java program to execute non-Java code, generally ANSI C/C++.This Perl module reveals the information in a highly-compressed JVM classfile by representing the information as a series of objects. It is hoped that this module will eventually lead to a JVM implementation in Perl (or Parrot), or possibly a way-ahead-of-time (WAT) to Perl (or Parrot) compiler for Java.It is important to remember that the Java classfile is highly-compressed. Classfiles are intended to be as small as possible as they are often sent across the network. This may explain the slightly odd object tree. One of the most important things to consider is the idea of a constant pool. All constants (constant strings, method names and signatures etc.) are clustered in the constant pool at the start of the classfile, and sprinkled throughout the file are references to the constant pool. The module attempts to hide this optimisation as much as possible from the user, however.Requirements:· Perl Requirements: · Perl


Java::JVM::Classfile Related Software