|
Eclipse JDT 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.eclipse.jdt.core.dom.ASTNode
|
+--org.eclipse.jdt.core.dom.Expression
|
+--org.eclipse.jdt.core.dom.StringLiteral
String literal nodes.
| Field Summary |
| Method Summary | |
String |
getEscapedValue()
Returns the string value of this literal node to the given string literal token. |
String |
getLiteralValue()
Returns the value of this literal node. |
int |
getNodeType()
Returns an integer value identifying the type of this concrete AST node. |
void |
setEscapedValue(String token)
Sets the string value of this literal node to the given string literal token. |
void |
setLiteralValue(String value)
Sets the value of this literal node. |
boolean |
subtreeMatch(ASTMatcher matcher,
Object other)
Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher. |
| Methods inherited from class org.eclipse.jdt.core.dom.Expression |
resolveTypeBinding |
| Methods inherited from class org.eclipse.jdt.core.dom.ASTNode |
accept, copySubtree, copySubtrees, equals, getAST, getFlags, getLength, getParent, getProperty, getRoot, getStartPosition, properties, setFlags, setProperty, setSourceRange, subtreeBytes, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public int getNodeType()
ASTNode
For each concrete node type there is a unique node type constant (name
and value). The unique node type constant for a concrete node type such as
CastExpression is ASTNode.CAST_EXPRESSION.
getNodeType in class ASTNode
public boolean subtreeMatch(ASTMatcher matcher,
Object other)
ASTNode
subtreeMatch in class ASTNodematcher - the matcherother - the other object, or null
true if the subtree matches, or
false if they do not matchpublic String getEscapedValue()
public void setEscapedValue(String token)
"" setLiteral("\"\"")"hello world" setLiteral("\"hello world\"")"boo\nhoo" setLiteral("\"boo\\nhoo\"")
token - the string literal token, including enclosing double
quotes and embedded escapes
IllegalArgumentException - if the argument is incorrectpublic String getLiteralValue()
For example,
StringLiteral s;
s.setEscapedValue("\"hello\\nworld\"");
assert s.getLiteralValue().equals("hello\nworld");
Note that this is a convenience method that converts from the stored
string literal token returned by getEscapedLiteral.
IllegalArgumentException - if the literal value cannot be convertedpublic void setLiteralValue(String value)
For example,
StringLiteral s;
s.setLiteralValue("hello\nworld");
assert s.getEscapedValue("\"hello\\nworld\"");
assert s.getLiteralValue().equals("hello\nworld");
Note that this is a convenience method that converts to the stored
string literal token acceptable to setEscapedLiteral.
IllegalArgumentException - if the argument is incorrect
|
Eclipse JDT 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||