Class PrintTokenVisitor
- java.lang.Object
-
- org.jd.core.v1.service.writer.visitor.PrintTokenVisitor
-
- All Implemented Interfaces:
TokenVisitor
public class PrintTokenVisitor extends java.lang.Object implements TokenVisitor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
PrintTokenVisitor.SearchLineNumberVisitor
-
Field Summary
Fields Modifier and Type Field Description protected int
index
protected int
newLineCount
protected Printer
printer
protected PrintTokenVisitor.SearchLineNumberVisitor
searchLineNumberVisitor
protected java.util.List<Token>
tokens
static int
UNKNOWN_LINE_NUMBER
-
Constructor Summary
Constructors Constructor Description PrintTokenVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
protected void
prepareNewLine()
protected int
searchLineNumber()
void
start(Printer printer, java.util.List<Token> tokens)
void
visit(BooleanConstantToken token)
void
visit(CharacterConstantToken token)
void
visit(DeclarationToken token)
void
visit(EndBlockToken token)
void
visit(EndMarkerToken token)
void
visit(KeywordToken token)
void
visit(LineNumberToken token)
void
visit(NewLineToken token)
void
visit(NumericConstantToken token)
void
visit(ReferenceToken token)
void
visit(StartBlockToken token)
void
visit(StartMarkerToken token)
void
visit(StringConstantToken token)
void
visit(TextToken token)
-
-
-
Field Detail
-
UNKNOWN_LINE_NUMBER
public static int UNKNOWN_LINE_NUMBER
-
searchLineNumberVisitor
protected PrintTokenVisitor.SearchLineNumberVisitor searchLineNumberVisitor
-
printer
protected Printer printer
-
tokens
protected java.util.List<Token> tokens
-
index
protected int index
-
newLineCount
protected int newLineCount
-
-
Method Detail
-
end
public void end()
-
visit
public void visit(BooleanConstantToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(CharacterConstantToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(DeclarationToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(StartBlockToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(EndBlockToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(StartMarkerToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(EndMarkerToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(NewLineToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(KeywordToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(LineNumberToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(NumericConstantToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(ReferenceToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(StringConstantToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
visit
public void visit(TextToken token)
- Specified by:
visit
in interfaceTokenVisitor
-
prepareNewLine
protected void prepareNewLine()
-
searchLineNumber
protected int searchLineNumber()
-
-