Class CsmToken
- java.lang.Object
-
- com.github.javaparser.printer.concretesyntaxmodel.CsmToken
-
- All Implemented Interfaces:
CsmElement
public class CsmToken extends java.lang.Object implements CsmElement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CsmToken.TokenContentCalculator
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
content
private CsmToken.TokenContentCalculator
tokenContentCalculator
private int
tokenType
-
Constructor Summary
Constructors Constructor Description CsmToken(int tokenType)
CsmToken(int tokenType, CsmToken.TokenContentCalculator tokenContentCalculator)
CsmToken(int tokenType, java.lang.String content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getContent(Node node)
int
getTokenType()
int
hashCode()
boolean
isNewLine()
boolean
isWhiteSpace()
void
prettyPrint(Node node, SourcePrinter printer)
java.lang.String
toString()
-
-
-
Field Detail
-
tokenType
private final int tokenType
-
content
private java.lang.String content
-
tokenContentCalculator
private CsmToken.TokenContentCalculator tokenContentCalculator
-
-
Constructor Detail
-
CsmToken
public CsmToken(int tokenType)
-
CsmToken
public CsmToken(int tokenType, java.lang.String content)
-
CsmToken
public CsmToken(int tokenType, CsmToken.TokenContentCalculator tokenContentCalculator)
-
-
Method Detail
-
getTokenType
public int getTokenType()
-
getContent
public java.lang.String getContent(Node node)
-
prettyPrint
public void prettyPrint(Node node, SourcePrinter printer)
- Specified by:
prettyPrint
in interfaceCsmElement
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isWhiteSpace
public boolean isWhiteSpace()
-
isNewLine
public boolean isNewLine()
-
-