public final class UrlFunctionValue extends AbstractTerm implements FunctionValue
UrlPlugin
Constructor and Description |
---|
UrlFunctionValue(int line,
int column,
String url)
Creates a new
UrlFunctionValue instance. |
UrlFunctionValue(String url)
Creates a new
UrlFunctionValue instance. |
Modifier and Type | Method and Description |
---|---|
UrlFunctionValue |
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 name of this object.
|
Optional<QuotationMode> |
quotationMode()
Gets the quotation mode, if present.
|
UrlFunctionValue |
quotationMode(QuotationMode quotationMode)
Sets the type of quotes to wrap around the url.
|
String |
textualValue()
Gets the url (does not includes quotes).
|
String |
url()
Gets the url (does not includes quotes).
|
UrlFunctionValue |
url(String url)
Sets the url (do not include quotes).
|
void |
write(StyleWriter writer,
StyleAppendable appendable)
Outputs this
Writable 's string representation. |
declaration, isTerm, self
append, destroy, group, group, isDestroyed, isFirst, isLast, isWritable, next, parent, prepend, previous, replaceWith, unlink
annotate, 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, writesOwnOrphanedComments
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
declaration
isTerm
append, destroy, group, group, isDestroyed, isFirst, isLast, next, parent, prepend, previous, replaceWith, unlink
annotate, annotateUnlessPresent, annotation, annotations, column, comment, comment, comments, comments, comments, hasAnnotation, hasAnnotation, hasSourcePosition, id, line, orphanedComments, orphanedComments, orphanedComments, toString, writesOwnComments, writesOwnOrphanedComments
isWritable
propagateBroadcast, shouldBreakBroadcast, status, status
public UrlFunctionValue(int line, int column, String url)
UrlFunctionValue
instance. If the url is quoted then use quotationMode(QuotationMode)
to
specify the type of quotes to use.
Important: The url should not be wrapped in quotes. Use quotationMode(QuotationMode)
for that.
line
- The line number.column
- The column number.url
- The url. This should not be wrapped in quotes.public UrlFunctionValue(String url)
UrlFunctionValue
instance. If the url is quoted then use quotationMode(QuotationMode)
to
specify the type of quotes to use.
Important: The url should not be wrapped in quotes. Use quotationMode(QuotationMode)
for that.
url
- The url. This should not be wrapped in quotes.public UrlFunctionValue url(String url)
Important: The url should not be wrapped in quotes. Use quotationMode(QuotationMode)
for that.
url
- The url.public String url()
public UrlFunctionValue quotationMode(QuotationMode quotationMode)
quotationMode
- The type of quotes, or null for no quotes.public Optional<QuotationMode> quotationMode()
Optional
if not present.public String textualValue()
url()
, which is identical to this method.textualValue
in interface Term
public void write(StyleWriter writer, StyleAppendable appendable) throws IOException
Writable
Writable
'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 Writable
s. Do not call the this method method directly on inner
or child Writable
s! That would bypass any overrides that are set on the StyleWriter
. Use StyleWriter.writeInner(Writable, StyleAppendable)
instead.
write
in interface Writable
writer
- Writer to use for output settings and for writing inner Writable
s.appendable
- Append direct content to this StyleAppendable
.IOException
- If an I/O error occurs.public UrlFunctionValue copy()
AbstractSyntax
AbstractSyntax.copiedFrom(Syntax)
on the
new copy.copy
in interface PropertyValueMember
copy
in interface Term
copy
in interface Syntax
copy
in class AbstractSyntax
Copyright (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.