public abstract static class TruffleString.SwitchEncodingNode extends Node
TruffleString.SwitchEncodingNode.execute(AbstractTruffleString, TruffleString.Encoding) for details.Node.Child, Node.Children| Modifier and Type | Method and Description |
|---|---|
static TruffleString.SwitchEncodingNode |
create()
Create a new
TruffleString.SwitchEncodingNode. |
abstract TruffleString |
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. |
static TruffleString.SwitchEncodingNode |
getUncached()
Get the uncached version of
TruffleString.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, toStringpublic abstract TruffleString execute(AbstractTruffleString a, TruffleString.Encoding encoding)
a that is encoded in the given encoding, which may be
the string itself or a converted version. Note that the string itself may be returned
even if it was originally created using a different encoding, if the string is
byte-equivalent in both encodings.
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 static TruffleString.SwitchEncodingNode create()
TruffleString.SwitchEncodingNode.public static TruffleString.SwitchEncodingNode getUncached()
TruffleString.SwitchEncodingNode.