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 classPrintTokenVisitor.SearchLineNumberVisitor
-
Field Summary
Fields Modifier and Type Field Description protected intindexprotected intnewLineCountprotected Printerprinterprotected PrintTokenVisitor.SearchLineNumberVisitorsearchLineNumberVisitorprotected java.util.List<Token>tokensstatic intUNKNOWN_LINE_NUMBER
-
Constructor Summary
Constructors Constructor Description PrintTokenVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend()protected voidprepareNewLine()protected intsearchLineNumber()voidstart(Printer printer, java.util.List<Token> tokens)voidvisit(BooleanConstantToken token)voidvisit(CharacterConstantToken token)voidvisit(DeclarationToken token)voidvisit(EndBlockToken token)voidvisit(EndMarkerToken token)voidvisit(KeywordToken token)voidvisit(LineNumberToken token)voidvisit(NewLineToken token)voidvisit(NumericConstantToken token)voidvisit(ReferenceToken token)voidvisit(StartBlockToken token)voidvisit(StartMarkerToken token)voidvisit(StringConstantToken token)voidvisit(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:
visitin interfaceTokenVisitor
-
visit
public void visit(CharacterConstantToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(DeclarationToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(StartBlockToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(EndBlockToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(StartMarkerToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(EndMarkerToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(NewLineToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(KeywordToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(LineNumberToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(NumericConstantToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(ReferenceToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(StringConstantToken token)
- Specified by:
visitin interfaceTokenVisitor
-
visit
public void visit(TextToken token)
- Specified by:
visitin interfaceTokenVisitor
-
prepareNewLine
protected void prepareNewLine()
-
searchLineNumber
protected int searchLineNumber()
-
-