jvm-parser-0.2.1: A parser for JVM bytecode files

CopyrightGalois, Inc. 2012-2014
LicenseBSD3
Maintaineratomb@galois.com
Stabilitystable
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell98

Language.JVM.JarReader

Description

A quick-n-dirty reader for JAR files. MANY keep-it-simple concessions have been made regarding the zip structure of jars (e.g. no ZIP64, Deflate-type compression only, etc., etc.). Please don't mistake this module for any kind of fully-fledged unzip implementation!

Info on the zip file format can be found at: http://www.pkware.com/documents/casestudies/APPNOTE.TXT

Synopsis

Documentation

newtype JarReader Source

Datatype representing a collection of .jar archives. Classfiles can be loaded from a JarReader using loadClassFromJar.

Constructors

JR 

Fields

unJR :: Map ByteString (FilePath, DirEnt)
 

Instances

addJar :: JarReader -> FilePath -> IO JarReader Source

Add a .jar archive to a JarReader

dumpJarReader :: JarReader -> IO () Source

Print all the directory entries known to this JarReader onto the console

loadClassFromJar Source

Arguments

:: String

Class file name to load

-> JarReader 
-> IO (Maybe Class) 

Load a class from the given JarReader.

newJarReader :: [FilePath] -> IO JarReader Source

Create a new JarReader from the given collection of .jar archives