Methods Summary |
---|
public void | addInputBufferListener(persistence.antlr.debug.InputBufferListener l)
if (inputBufferListeners == null) inputBufferListeners = new Vector();
inputBufferListeners.addElement(l);
|
public void | fireConsume(char c)
inputBufferEvent.setValues(InputBufferEvent.CONSUME, c, 0);
fireEvents(CONSUME, inputBufferListeners);
|
public void | fireEvent(int type, persistence.antlr.debug.ListenerBase l)
switch(type) {
case CONSUME: ((InputBufferListener)l).inputBufferConsume(inputBufferEvent); break;
case LA: ((InputBufferListener)l).inputBufferLA(inputBufferEvent); break;
case MARK: ((InputBufferListener)l).inputBufferMark(inputBufferEvent); break;
case REWIND: ((InputBufferListener)l).inputBufferRewind(inputBufferEvent); break;
default:
throw new IllegalArgumentException("bad type "+type+" for fireEvent()");
}
|
public void | fireEvents(int type, java.util.Vector listeners)
Vector targets=null;
ListenerBase l=null;
synchronized (this) {
if (listeners == null) return;
targets = (Vector)listeners.clone();
}
if (targets != null)
for (int i = 0; i < targets.size(); i++) {
l = (ListenerBase)targets.elementAt(i);
fireEvent(type, l);
}
|
public void | fireLA(char c, int la)
inputBufferEvent.setValues(InputBufferEvent.LA, c, la);
fireEvents(LA, inputBufferListeners);
|
public void | fireMark(int pos)
inputBufferEvent.setValues(InputBufferEvent.MARK, ' ", pos);
fireEvents(MARK, inputBufferListeners);
|
public void | fireRewind(int pos)
inputBufferEvent.setValues(InputBufferEvent.REWIND, ' ", pos);
fireEvents(REWIND, inputBufferListeners);
|
public java.util.Vector | getInputBufferListeners()
return inputBufferListeners;
|
protected void | refresh(java.util.Vector listeners)
Vector v;
synchronized (listeners) {
v = (Vector)listeners.clone();
}
if (v != null)
for (int i = 0; i < v.size(); i++)
((ListenerBase)v.elementAt(i)).refresh();
|
public void | refreshListeners()
refresh(inputBufferListeners);
|
public void | removeInputBufferListener(persistence.antlr.debug.InputBufferListener l)
if (inputBufferListeners != null)
inputBufferListeners.removeElement(l);
|