Class ChildTextElement
- java.lang.Object
-
- com.github.javaparser.printer.lexicalpreservation.TextElement
-
- com.github.javaparser.printer.lexicalpreservation.ChildTextElement
-
- All Implemented Interfaces:
TextElementMatcher
class ChildTextElement extends TextElement
Represent the position of a child node in the NodeText of its parent.
-
-
Constructor Summary
Constructors Constructor Description ChildTextElement(Node child)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)(package private) java.lang.Stringexpand()(package private) NodegetChild()(package private) NodeTextgetNodeTextForWrappedNode()(package private) java.util.Optional<Range>getRange()inthashCode()booleanisChildOfClass(java.lang.Class<? extends Node> nodeClass)Is this TextElement representing a child of the given class?booleanisComment()booleanisIdentifier()booleanisNewline()(package private) booleanisNode(Node node)booleanisPrimitive()booleanisSeparator()booleanisSpaceOrTab()(package private) booleanisToken(int tokenKind)booleanisWhiteSpace()java.lang.StringtoString()-
Methods inherited from class com.github.javaparser.printer.lexicalpreservation.TextElement
isChild, isCommentToken, isWhiteSpaceOrComment, match, matchByRange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.printer.lexicalpreservation.TextElementMatcher
and
-
-
-
-
Field Detail
-
child
private final Node child
-
-
Constructor Detail
-
ChildTextElement
ChildTextElement(Node child)
-
-
Method Detail
-
expand
java.lang.String expand()
- Specified by:
expandin classTextElement
-
getChild
Node getChild()
-
isToken
boolean isToken(int tokenKind)
- Specified by:
isTokenin classTextElement
-
isNode
boolean isNode(Node node)
- Specified by:
isNodein classTextElement
-
getNodeTextForWrappedNode
NodeText getNodeTextForWrappedNode()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isWhiteSpace
public boolean isWhiteSpace()
- Specified by:
isWhiteSpacein classTextElement
-
isSpaceOrTab
public boolean isSpaceOrTab()
- Specified by:
isSpaceOrTabin classTextElement
-
isNewline
public boolean isNewline()
- Specified by:
isNewlinein classTextElement
-
isComment
public boolean isComment()
- Specified by:
isCommentin classTextElement
-
isSeparator
public boolean isSeparator()
- Specified by:
isSeparatorin classTextElement
-
isIdentifier
public boolean isIdentifier()
- Specified by:
isIdentifierin classTextElement
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein classTextElement
-
isChildOfClass
public boolean isChildOfClass(java.lang.Class<? extends Node> nodeClass)
Description copied from class:TextElementIs this TextElement representing a child of the given class?- Specified by:
isChildOfClassin classTextElement
-
getRange
java.util.Optional<Range> getRange()
- Specified by:
getRangein classTextElement
-
-