|
|||||||||
| Home >> All >> org >> eclipse >> jdt >> core >> [ dom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.jdt.core.dom
Class CharacterLiteral

java.lang.Objectorg.eclipse.jdt.core.dom.ASTNode
org.eclipse.jdt.core.dom.Expression
org.eclipse.jdt.core.dom.CharacterLiteral
- public class CharacterLiteral
- extends Expression
Character literal nodes.
- Since:
- 2.0
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.jdt.core.dom.ASTNode |
ASTNode.NodeList |
| Field Summary | |
static SimplePropertyDescriptor |
ESCAPED_VALUE_PROPERTY
The "escapedValue" structural property of this node type. |
private java.lang.String |
escapedValue
The literal string, including quotes and escapes; defaults to the literal for the character 'X'. |
private static java.util.List |
PROPERTY_DESCRIPTORS
A list of property descriptors (element type: StructuralPropertyDescriptor), or null if uninitialized. |
| Constructor Summary | |
(package private) |
CharacterLiteral(AST ast)
Creates a new unparented character literal node owned by the given AST. |
| Method Summary | |
(package private) void |
accept0(ASTVisitor visitor)
Accepts the given visitor on a type-specific visit of the current node. |
char |
charValue()
Returns the value of this literal node. |
(package private) ASTNode |
clone0(AST target)
Returns a deep copy of the subtree of AST nodes rooted at this node. |
java.lang.String |
getEscapedValue()
Returns the string value of this literal node. |
(package private) int |
getNodeType0()
Returns an integer value identifying the type of this concrete AST node. |
(package private) java.lang.Object |
internalGetSetObjectProperty(SimplePropertyDescriptor property,
boolean get,
java.lang.Object value)
Sets the value of the given property for this node. |
(package private) java.util.List |
internalStructuralPropertiesForType(int apiLevel)
Returns a list of property descriptors for this node type. |
(package private) int |
memSize()
Returns an estimate of the memory footprint of this node in bytes. |
static java.util.List |
propertyDescriptors(int apiLevel)
Returns a list of structural property descriptors for this node type. |
void |
setCharValue(char value)
Sets the value of this character literal node to the given character. |
void |
setEscapedValue(java.lang.String value)
Sets the string value of this literal node. |
(package private) boolean |
subtreeMatch0(ASTMatcher matcher,
java.lang.Object other)
Returns whether the subtree rooted at the given node matches the given other object as decided by the given matcher. |
(package private) int |
treeSize()
Returns an estimate of the memory footprint in bytes of the entire subtree rooted at this node. |
| Methods inherited from class org.eclipse.jdt.core.dom.Expression |
resolveTypeBinding |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
ESCAPED_VALUE_PROPERTY
public static final SimplePropertyDescriptor ESCAPED_VALUE_PROPERTY
- The "escapedValue" structural property of this node type.
- Since:
- 3.0
PROPERTY_DESCRIPTORS
private static final java.util.List PROPERTY_DESCRIPTORS
- A list of property descriptors (element type:
StructuralPropertyDescriptor),
or null if uninitialized.
escapedValue
private java.lang.String escapedValue
- The literal string, including quotes and escapes; defaults to the
literal for the character 'X'.
| Constructor Detail |
CharacterLiteral
CharacterLiteral(AST ast)
- Creates a new unparented character literal node owned by the given AST.
By default, the character literal denotes an unspecified character.
N.B. This constructor is package-private.
| Method Detail |
propertyDescriptors
public static java.util.List propertyDescriptors(int apiLevel)
- Returns a list of structural property descriptors for this node type.
Clients must not modify the result.
- Since:
- 3.0
internalStructuralPropertiesForType
final java.util.List internalStructuralPropertiesForType(int apiLevel)
- Description copied from class:
ASTNode - Returns a list of property descriptors for this node type.
Clients must not modify the result. This abstract method
must be implemented in each concrete AST node type.
N.B. This method is package-private, so that the implementations of this method in each of the concrete AST node types do not clutter up the API doc.
- Specified by:
internalStructuralPropertiesForTypein classASTNode
internalGetSetObjectProperty
final java.lang.Object internalGetSetObjectProperty(SimplePropertyDescriptor property, boolean get, java.lang.Object value)
- Description copied from class:
ASTNode - Sets the value of the given property for this node.
The default implementation of this method throws an exception explaining
that this node does not have such a property. This method should be
extended in subclasses that have at leasy one simple property whose value
type is a reference type.
- Overrides:
internalGetSetObjectPropertyin classASTNode
getNodeType0
final int getNodeType0()
- Description copied from class:
ASTNode - Returns an integer value identifying the type of this concrete AST node.
This internal method is implemented in each of the concrete node subclasses.
- Specified by:
getNodeType0in classASTNode
clone0
ASTNode clone0(AST target)
- Description copied from class:
ASTNode - Returns a deep copy of the subtree of AST nodes rooted at this node.
The resulting nodes are owned by the given AST, which may be different
from the AST of this node. Even if this node has a parent, the
result node will be unparented.
This method must be implemented in subclasses.
This method does not report pre- and post-clone events. All callers should instead call
clone(AST)to ensure that pre- and post-clone events are reported.N.B. This method is package-private, so that the implementations of this method in each of the concrete AST node types do not clutter up the API doc.
subtreeMatch0
final boolean subtreeMatch0(ASTMatcher matcher, java.lang.Object other)
- Description copied from class:
ASTNode - Returns whether the subtree rooted at the given node matches the
given other object as decided by the given matcher.
This internal method is implemented in each of the concrete node subclasses.
- Specified by:
subtreeMatch0in classASTNode
accept0
void accept0(ASTVisitor visitor)
- Description copied from class:
ASTNode - Accepts the given visitor on a type-specific visit of the current node.
This method must be implemented in all concrete AST node types.
General template for implementation on each concrete ASTNode class:
Note that the caller (boolean visitChildren = visitor.visit(this); if (visitChildren) { // visit children in normal left to right reading order acceptChild(visitor, getProperty1()); acceptChildren(visitor, rawListProperty); acceptChild(visitor, getProperty2()); } visitor.endVisit(this);accept) take cares of invokingvisitor.preVisit(this)andvisitor.postVisit(this).
getEscapedValue
public java.lang.String getEscapedValue()
- Returns the string value of this literal node. The value is the sequence
of characters that would appear in the source program, including
enclosing single quotes and embedded escapes.
setEscapedValue
public void setEscapedValue(java.lang.String value)
- Sets the string value of this literal node. The value is the sequence
of characters that would appear in the source program, including
enclosing single quotes and embedded escapes. For example,
'a'setEscapedValue("\'a\'")'\n'setEscapedValue("\'\\n\'")
charValue
public char charValue()
- Returns the value of this literal node.
For example,
CharacterLiteral s; s.setEscapedValue("\'x\'"); assert s.charValue() == 'x';
setCharValue
public void setCharValue(char value)
- Sets the value of this character literal node to the given character.
For example,
CharacterLiteral s; s.setCharValue('x'); assert s.charValue() == 'x'; assert s.getEscapedValue("\'x\'");
memSize
int memSize()
- Description copied from class:
ASTNode - Returns an estimate of the memory footprint of this node in bytes.
The estimate does not include the space occupied by child nodes.
treeSize
int treeSize()
- Description copied from class:
ASTNode - Returns an estimate of the memory footprint in bytes of the entire
subtree rooted at this node.
N.B. This method is package-private, so that the implementations of this method in each of the concrete AST node types do not clutter up the API doc.
|
|||||||||
| Home >> All >> org >> eclipse >> jdt >> core >> [ dom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC