JML

org.multijava.util.compiler
Class TabbedPrintWriter

java.lang.Object
  extended byorg.multijava.util.compiler.TabbedPrintWriter
Direct Known Subclasses:
Main.SuiteWriter

public class TabbedPrintWriter
extends Object

This class implements a tabbed print writer


Field Summary
protected  int column
           
protected  int line
           
private  PrintWriter p
           
protected  int pos
           
 
Constructor Summary
TabbedPrintWriter(Writer writer)
          construct a pretty printer object for java code
 
Method Summary
 void add(int pos)
          Increment tab
private  void checkPos()
           
 void close()
          Close the stream at the end
 int getColumn()
           
 int getLine()
           
 int getPos()
           
 void print(String s)
          Print a string
 void println()
          Print a new line
 void setPos(int pos)
          Set pos
private  String space(int count)
           
private  String spaceIn(int count)
           
 void sub(int pos)
          Decrement tab
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

private PrintWriter p

pos

protected int pos

line

protected int line

column

protected int column
Constructor Detail

TabbedPrintWriter

public TabbedPrintWriter(Writer writer)
construct a pretty printer object for java code

Parameters:
writer - the writer into which the code is generated
Method Detail

close

public void close()
Close the stream at the end


getLine

public int getLine()

getColumn

public int getColumn()

getPos

public int getPos()

setPos

public void setPos(int pos)
Set pos


add

public void add(int pos)
Increment tab


sub

public void sub(int pos)
Decrement tab


println

public void println()
Print a new line


print

public void print(String s)
Print a string


checkPos

private void checkPos()

space

private String space(int count)

spaceIn

private String spaceIn(int count)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.