public final class IdSelector extends AbstractSelectorPart implements SimpleSelector
IdSelectorParser| Constructor and Description |
|---|
IdSelector(int line,
int column,
String name)
Creates a new instance with the given line and column numbers and id name.
|
IdSelector(String name)
Creates a new instance with no line or number specified (used for dynamically created
Syntax units). |
| Modifier and Type | Method and Description |
|---|---|
IdSelector |
copy()
For implementations: do not copy comments or orphaned comments, instead be sure to call
AbstractSyntax.copiedFrom(Syntax) on the
new copy. |
String |
name()
Gets the id name.
|
IdSelector |
name(String name)
Sets the id name.
|
SelectorPartType |
type()
Gets the
SelectorPartType of this SelectorPart. |
void |
write(StyleWriter writer,
StyleAppendable appendable)
Outputs this
Writable's string representation. |
selfappend, destroy, group, group, isDestroyed, isFirst, isLast, isWritable, next, parent, prepend, previous, replaceWith, unlinkannotate, annotateUnlessPresent, annotation, annotations, column, comment, comment, comments, comments, comments, copiedFrom, equals, hasAnnotation, hasAnnotation, hashCode, hasSourcePosition, id, line, orphanedComments, orphanedComments, orphanedComments, propagateBroadcast, shouldBreakBroadcast, status, status, toString, toString, writesOwnComments, writesOwnOrphanedCommentsclone, finalize, getClass, notify, notifyAll, wait, wait, waitparentappend, destroy, group, group, isDestroyed, isFirst, isLast, next, prepend, previous, replaceWith, unlinkannotate, annotateUnlessPresent, annotation, annotations, column, comment, comment, comments, comments, comments, hasAnnotation, hasAnnotation, hasSourcePosition, id, line, orphanedComments, orphanedComments, orphanedComments, toString, writesOwnComments, writesOwnOrphanedCommentsisWritablepropagateBroadcast, shouldBreakBroadcast, status, statuspublic IdSelector(int line,
int column,
String name)
If dynamically creating a new instance then use IdSelector(String) instead.
line - The line number.column - The column number.name - The id name.public IdSelector(String name)
Syntax units).name - The id name.public IdSelector name(String name)
name - The id name.public String name()
public SelectorPartType type()
SelectorParttype in interface SelectorPartSelectorPartType.public void write(StyleWriter writer, StyleAppendable appendable) throws IOException
WritableWritable's string representation.
Important notes for implementation:
Do not use the StyleWriter in an attempt to write direct content (Strings, chars, etc...). Use the StyleAppendable.
The StyleWriter should be used to make decisions based on writer settings (e.g., compressed vs. verbose output
mode), as well as for writing inner or child Writables. Do not call the this method method directly on inner
or child Writables! That would bypass any overrides that are set on the StyleWriter. Use StyleWriter.writeInner(Writable, StyleAppendable) instead.
write in interface Writablewriter - Writer to use for output settings and for writing inner Writables.appendable - Append direct content to this StyleAppendable.IOException - If an I/O error occurs.public IdSelector copy()
AbstractSyntaxAbstractSyntax.copiedFrom(Syntax) on the
new copy.copy in interface SelectorPartcopy in interface SimpleSelectorcopy in interface Syntaxcopy in class AbstractSyntaxCopyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.