Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javafe.reader
Class BinReader

    java.lang.Object
      javafe.reader.Reader
          javafe.reader.BinReader

public class BinReader
extends Reader

A BinReader is a Reader that reads in CompilationUnits from binary files (.class files).

BinReaders do not cache the results of their reading and always return spec files.

TypeDecls produced by BinReaders always have specOnly set.

This version is not known to work on Java 1.1 class files. Later versions are planned to return CompilationUnits with stubs where inner classes should be. It is then the caller's responsibility to call this class repeatedly to obtain all the inner classes then stitch them together in a single seamless CompilationUnit. (Most likely, a new class will be introduced to perform this function, mapping P.N's to Compilation Units.

Constructor Summary
`BinReader()`

Method Summary
`static void` | `main(java.lang.String[] args)` * Test methods: * *
`CompilationUnit` | `read(GenericFile target, boolean avoidSpec)` Attempt to read and parse a CompilationUnit from *binary* target.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BinReader

    public BinReader()

Method Detail

### read

    public CompilationUnit read(GenericFile target,
                                boolean avoidSpec)

  Attempt to read and parse a CompilationUnit from *binary* target. Any errors encountered are reported via javafe.util.ErrorSet. Null is returned iff an error was encountered.

  We always return a spec file. (avoidSpec is ignored)

  This function is not cached.

  Target must be non-null.

  Specified by:
    `read` in class `Reader`
  Parameters:
    `target` - The source to be read
    `avoidSpec` - If true, then bodies are parsed as well, if possible; if false, no method bodies are parsed.
  Returns:
    The resulting compilation unit, or null if an error occurred during parsing

### main

    public static void main(java.lang.String[] args)

  * Test methods: * *

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

The ESC/Java2 Project Homepage