FileDocCategorySizeDatePackage
DebuggingInputBuffer.javaAPI DocGlassfish v2 API1702Wed Feb 08 12:31:16 GMT 2006persistence.antlr.debug

DebuggingInputBuffer

public class DebuggingInputBuffer extends InputBuffer

Fields Summary
private InputBuffer
buffer
private InputBufferEventSupport
inputBufferEventSupport
private boolean
debugMode
Constructors Summary
public DebuggingInputBuffer(InputBuffer buffer)



	   
		this.buffer = buffer;
		inputBufferEventSupport = new InputBufferEventSupport(this);
	
Methods Summary
public charLA(int i)

		char la = buffer.LA(i);
		if (debugMode)
			inputBufferEventSupport.fireLA(la,i);
		return la;
	
public voidaddInputBufferListener(persistence.antlr.debug.InputBufferListener l)

	  inputBufferEventSupport.addInputBufferListener(l);
	
public voidconsume()

		char la = ' ";
		try {la = buffer.LA(1);}
		catch (CharStreamException e) {} // vaporize it...
		buffer.consume();
		if (debugMode)
			inputBufferEventSupport.fireConsume(la);
	
public voidfill(int a)

		buffer.fill(a);
	
public java.util.VectorgetInputBufferListeners()

		return inputBufferEventSupport.getInputBufferListeners();
	
public booleanisDebugMode()

		return debugMode;
	
public booleanisMarked()

		return buffer.isMarked();
	
public intmark()

		int m = buffer.mark();
		inputBufferEventSupport.fireMark(m);
		return m;
	
public voidremoveInputBufferListener(persistence.antlr.debug.InputBufferListener l)

	  if (inputBufferEventSupport != null)
	    inputBufferEventSupport.removeInputBufferListener(l);
	
public voidrewind(int mark)

		buffer.rewind(mark);
		inputBufferEventSupport.fireRewind(mark);
	
public voidsetDebugMode(boolean value)

		debugMode = value;