|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.node.Node
tip.node.Token
tip.node.TWhiteSpace
public final class TWhiteSpace
TWhiteSpace
represents a white space
token from the input file.
Constructor Summary | |
---|---|
TWhiteSpace(String text)
Creates a new TWhiteSpace token with text as text and with no line
and position information. |
|
TWhiteSpace(String text,
int line,
int pos)
Creates a new TWhiteSpace token with text as text and with the
given line and position information. |
|
TWhiteSpace(String text,
Token token)
Creates a new TWhiteSpace token with text as text which is
an alias of the given token. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseTWhiteSpace(TWhiteSpace) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this TWhiteSpace
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this TWhiteSpace node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this TWhiteSpace node with the
question to the QuestionAnswer visitor. |
|
TWhiteSpace |
clone()
Creates a clone of this TWhiteSpace token. |
|
TWhiteSpace |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this TWhiteSpace token while putting all
old node-new node relations in the map oldToNewMap . |
|
TokenEnum |
kindToken()
Returns the TokenEnum corresponding to the
type of this Token node. |
Methods inherited from class tip.node.Token |
---|
checkOptionalInvariant, getChildren, getDescendants, getLine, getPos, getText, getToken, kindNode, setLine, setPos, setText, toString |
Methods inherited from class tip.node.Node |
---|
getAncestor, getAncestor, getAncestor, getChildren, getChildren, getDescendants, getDescendants, getDescendants, isOptionalInvariant, parent, replaceBy, setOptionalInvariant |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TWhiteSpace(String text)
TWhiteSpace
token with text
as text and with no line
and position information.
text
- the text of this TWhiteSpace
tokenpublic TWhiteSpace(String text, int line, int pos)
TWhiteSpace
token with text
as text and with the
given line and position information.
text
- the text of this tokenline
- the line number information for this TWhiteSpace
tokenpos
- the line position information for this TWhiteSpace
tokenpublic TWhiteSpace(String text, Token token)
TWhiteSpace
token with text
as text which is
an alias of the given token.
text
- the text of this tokentoken
- the original token for this TWhiteSpace
tokenMethod Detail |
---|
public TWhiteSpace clone()
TWhiteSpace
token.
clone
in interface NodeInterface
clone
in class Token
TWhiteSpace
tokenpublic TWhiteSpace clone(Map<Node,Node> oldToNewMap)
TWhiteSpace
token while putting all
old node-new node relations in the map oldToNewMap
.
clone
in interface NodeInterface
clone
in class Token
oldToNewMap
- the map filled with the old node-new node relation
TWhiteSpace
tokenpublic TokenEnum kindToken()
TokenEnum
corresponding to the
type of this Token
node.
kindToken
in class Token
TokenEnum
for this nodepublic void apply(Analysis caller)
Analysis.caseTWhiteSpace(TWhiteSpace)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this TWhiteSpace
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this TWhiteSpace
node to the Answer
visitor.
apply
in interface NodeInterface
apply
in class Node
caller
- the Answer
to which this node is applied
caller
public <Q> void apply(Question<Q> caller, Q question)
TWhiteSpace
node to the Question
visitor caller
.
apply
in interface NodeInterface
apply
in class Node
caller
- the Question
to which this node is appliedquestion
- the question provided to caller
public <Q,A> A apply(QuestionAnswer<Q,A> caller, Q question)
caller
by applying this TWhiteSpace
node with the
question
to the QuestionAnswer
visitor.
apply
in interface NodeInterface
apply
in class Node
caller
- the QuestionAnswer
to which this node is appliedquestion
- the question provided to caller
caller
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |