|
||||||||||
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.TLBrace
public final class TLBrace
TLBrace
represents a '{'
token from the input file.
Constructor Summary | |
---|---|
TLBrace()
Creates a new TLBrace token with no line and position information. |
|
TLBrace(int line,
int pos)
Creates a new TLBrace token with the given line and position information. |
|
TLBrace(Token token)
Creates a new TLBrace token that is an alias of the given token. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseTLBrace(TLBrace) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this TLBrace
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this TLBrace node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this TLBrace node with the
question to the QuestionAnswer visitor. |
|
TLBrace |
clone()
Creates a clone of this TLBrace token. |
|
TLBrace |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this TLBrace 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. |
|
void |
setText(String text)
Implements the Token.setText(String) method. |
Methods inherited from class tip.node.Token |
---|
checkOptionalInvariant, getChildren, getDescendants, getLine, getPos, getText, getToken, kindNode, setLine, setPos, 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 TLBrace()
TLBrace
token with no line and position information.
public TLBrace(int line, int pos)
TLBrace
token with the given line and position information.
line
- the line number information for this TLBrace
tokenpos
- the line position information for this TLBrace
tokenpublic TLBrace(Token token)
TLBrace
token that is an alias of the given token.
token
- the original token for this TLBrace
tokenMethod Detail |
---|
public TLBrace clone()
TLBrace
token.
clone
in interface NodeInterface
clone
in class Token
TLBrace
tokenpublic TLBrace clone(Map<Node,Node> oldToNewMap)
TLBrace
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
TLBrace
tokenpublic TokenEnum kindToken()
TokenEnum
corresponding to the
type of this Token
node.
kindToken
in class Token
TokenEnum
for this nodepublic void setText(String text)
Token.setText(String)
method. Since TLBrace represents
fixed token, this method throws a RuntimeException
.
setText
in class Token
text
- the new text of this tokenpublic void apply(Analysis caller)
Analysis.caseTLBrace(TLBrace)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this TLBrace
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this TLBrace
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)
TLBrace
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 TLBrace
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 |