public abstract static class MutableTruffleString.SwitchEncodingNode extends Node
MutableTruffleString.SwitchEncodingNode.execute(AbstractTruffleString, TruffleString.Encoding, TranscodingErrorHandler)
for
details.Node.Child, Node.Children
Modifier and Type | Method and Description |
---|---|
static MutableTruffleString.SwitchEncodingNode |
create()
Create a new
MutableTruffleString.SwitchEncodingNode . |
MutableTruffleString |
execute(AbstractTruffleString a,
TruffleString.Encoding encoding)
Returns a version of string
a that is encoded in the given encoding, which may be
the string itself or a converted version. |
abstract MutableTruffleString |
execute(AbstractTruffleString a,
TruffleString.Encoding encoding,
TranscodingErrorHandler errorHandler)
Returns a version of string
a that is encoded in the given encoding, which may be
the string itself or a converted version. |
static MutableTruffleString.SwitchEncodingNode |
getUncached()
Get the uncached version of
MutableTruffleString.SwitchEncodingNode . |
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toString
public final MutableTruffleString execute(AbstractTruffleString a, TruffleString.Encoding encoding)
a
that is encoded in the given encoding, which may be
the string itself or a converted version.
If no lossless conversion is possible, the string is converted on a best-effort basis; no
exception is thrown and characters which cannot be mapped in the target encoding are
replaced by '�'
(for UTF-*) or '?'
.
public abstract MutableTruffleString execute(AbstractTruffleString a, TruffleString.Encoding encoding, TranscodingErrorHandler errorHandler)
a
that is encoded in the given encoding, which may be
the string itself or a converted version. Transcoding errors are handled with
errorHandler
.public static MutableTruffleString.SwitchEncodingNode create()
MutableTruffleString.SwitchEncodingNode
.public static MutableTruffleString.SwitchEncodingNode getUncached()
MutableTruffleString.SwitchEncodingNode
.