|
||||||||||
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.TIdentifier
public final class TIdentifier
TIdentifier
represents a identifier
token from the input file.
Constructor Summary | |
---|---|
TIdentifier(String text)
Creates a new TIdentifier token with text as text and with no line
and position information. |
|
TIdentifier(String text,
int line,
int pos)
Creates a new TIdentifier token with text as text and with the
given line and position information. |
|
TIdentifier(String text,
Token token)
Creates a new TIdentifier token with text as text which is
an alias of the given token. |
|
TIdentifier(String text,
Token token,
PDecl _decl_,
Type _type_)
Creates a new TIdentifier token with the given nodes as children. |
Method Summary | ||
---|---|---|
void |
apply(Analysis caller)
Calls the Analysis.caseTIdentifier(TIdentifier) of the Analysis caller . |
|
|
apply(Answer<A> caller)
Returns the answer for caller by applying this TIdentifier
node to the Answer visitor. |
|
|
apply(Question<Q> caller,
Q question)
Applies this TIdentifier node to the Question visitor caller . |
|
|
apply(QuestionAnswer<Q,A> caller,
Q question)
Returns the answer for caller by applying this TIdentifier node with the
question to the QuestionAnswer visitor. |
|
TIdentifier |
clone()
Creates a clone of this TIdentifier token. |
|
TIdentifier |
clone(Map<Node,Node> oldToNewMap)
Creates a deep clone of this TIdentifier token while putting all
old node-new node relations in the map oldToNewMap . |
|
PDecl |
getDecl()
Returns the decl field of this TIdentifier node. |
|
Type |
getType()
Returns the type field of this TIdentifier node. |
|
TokenEnum |
kindToken()
Returns the TokenEnum corresponding to the
type of this Token node. |
|
void |
setDecl(PDecl value)
Sets the decl field of this TIdentifier node. |
|
void |
setType(Type value)
Sets the type field of this TIdentifier 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 TIdentifier(String text)
TIdentifier
token with text
as text and with no line
and position information.
text
- the text of this TIdentifier
tokenpublic TIdentifier(String text, int line, int pos)
TIdentifier
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 TIdentifier
tokenpos
- the line position information for this TIdentifier
tokenpublic TIdentifier(String text, Token token)
TIdentifier
token with text
as text which is
an alias of the given token.
text
- the text of this tokentoken
- the original token for this TIdentifier
tokenpublic TIdentifier(String text, Token token, PDecl _decl_, Type _type_)
TIdentifier
token with the given nodes as children.
The basic child nodes are removed from their previous parents.
text
- the Text
child of this TIdentifier
tokentoken
- the Token
child of this TIdentifier
token_decl_
- the Decl
child of this TIdentifier
token_type_
- the Type
child of this TIdentifier
tokenMethod Detail |
---|
public TIdentifier clone()
TIdentifier
token.
clone
in interface NodeInterface
clone
in class Token
TIdentifier
tokenpublic TIdentifier clone(Map<Node,Node> oldToNewMap)
TIdentifier
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
TIdentifier
tokenpublic TokenEnum kindToken()
TokenEnum
corresponding to the
type of this Token
node.
kindToken
in class Token
TokenEnum
for this nodepublic PDecl getDecl()
decl
field of this TIdentifier
node.
decl
field of this TIdentifier
nodepublic void setDecl(PDecl value)
decl
field of this TIdentifier
node.
value
- the new decl
field of this TIdentifier
nodepublic Type getType()
type
field of this TIdentifier
node.
type
field of this TIdentifier
nodepublic void setType(Type value)
type
field of this TIdentifier
node.
value
- the new type
field of this TIdentifier
nodepublic void apply(Analysis caller)
Analysis.caseTIdentifier(TIdentifier)
of the Analysis
caller
.
apply
in interface NodeInterface
apply
in class Node
sw
- the Analysis
to which this TIdentifier
node is appliedpublic <A> A apply(Answer<A> caller)
caller
by applying this TIdentifier
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)
TIdentifier
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 TIdentifier
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 |