|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IdentifierSegment
Component in a compound identifier. It is described by its name and how the name is quoted.
For example, the identifier
[Store].USA.[New Mexico].&[45]
has four segments:
Quoting.QUOTED
Quoting.UNQUOTED
Quoting.QUOTED
Quoting.KEY
QUOTED and UNQUOTED segments are represented using a
NameSegment
;
KEY segments are represented using a
KeySegment
.
To parse an identifier into a list of segments, use the method
IdentifierNode.parseIdentifier(String)
and then call
IdentifierNode.getSegmentList()
on the resulting
node.
Method Summary | |
---|---|
List<NameSegment> |
getKeyParts()
Returns the key components, if this IdentifierSegment is a key. |
String |
getName()
Returns the name of this IdentifierSegment. |
Quoting |
getQuoting()
Returns how this Segment is quoted. |
ParseRegion |
getRegion()
Returns the region of the source code which this Segment was created from, if it was created by parsing. |
String |
toString()
Returns a string representation of this Segment. |
void |
toString(StringBuilder buf)
Appends a string representation of this Segment to a StringBuffer. |
Method Detail |
---|
String toString()
For example, "[Foo]", "&[123]", "Abc".
toString
in class Object
void toString(StringBuilder buf)
buf
- StringBufferParseRegion getRegion()
Quoting getQuoting()
String getName()
null
if this IdentifierSegment represents a key.
List<NameSegment> getKeyParts()
getQuoting()
returns
Quoting.KEY
.)
Returns null otherwise.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |