antlr

Class TokenStreamRewriteEngine.RewriteOperation

Enclosing Class:
TokenStreamRewriteEngine
Known Direct Subclasses:
TokenStreamRewriteEngine.InsertBeforeOp, TokenStreamRewriteEngine.ReplaceOp

(package private) static class TokenStreamRewriteEngine.RewriteOperation
extends Object

Field Summary

protected int
index
protected String
text

Constructor Summary

RewriteOperation(int index, String text)

Method Summary

int
execute(StringBuffer buf)
Execute the rewrite operation by possibly adding to the buffer.
String
toString()

Field Details

index

protected int index

text

protected String text

Constructor Details

RewriteOperation

protected RewriteOperation(int index,
                           String text)

Method Details

execute

public int execute(StringBuffer buf)
Execute the rewrite operation by possibly adding to the buffer. Return the index of the next token to operate on.

toString

public String toString()