org.jikesrvm
Class PrintContainer

java.lang.Object
  extended by org.jikesrvm.PrintContainer

public final class PrintContainer
extends Object

The subclasses of PrintContainer all implement the PrintLN interface. They are used by our Throwable to print stack traces; it lets one use a single class to operate on PrintContainer.WithPrintWriter and PrintStream output streams and for the VM.sysWrite(org.jikesrvm.classloader.Atom) output method.

We use it so we can print stack traces without having to provide multiple versions of each method, one for each kind of output stream.


Nested Class Summary
private static class PrintContainer.WithPrintStream
          Print via PrintStream
private static class PrintContainer.WithPrintWriter
          Print via PrintWriter
private static class PrintContainer.WithSysWrite
          This (nested) class does printing via VM.sysWrite(org.jikesrvm.classloader.Atom)
 
Field Summary
static PrintLN readyPrinter
           
 
Constructor Summary
private PrintContainer()
          Can not be instantiated.
 
Method Summary
static PrintLN get(PrintStream out)
           
static PrintLN get(PrintWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

readyPrinter

public static final PrintLN readyPrinter
Constructor Detail

PrintContainer

private PrintContainer()
Can not be instantiated.

Method Detail

get

public static PrintLN get(PrintStream out)

get

public static PrintLN get(PrintWriter out)