public abstract static class TruffleString.FromJavaStringNode extends Node
TruffleString
from a Java string. See
TruffleString.FromJavaStringNode.execute(String, int, int, TruffleString.Encoding, boolean)
for details.Node.Child, Node.Children
Modifier and Type | Method and Description |
---|---|
static TruffleString.FromJavaStringNode |
create()
Create a new
TruffleString.FromJavaStringNode . |
abstract TruffleString |
execute(String value,
int charOffset,
int length,
TruffleString.Encoding encoding,
boolean copy)
Creates a
TruffleString from a given region in a Java string, re-using its
internal byte array if possible and the region covers the entire string. |
TruffleString |
execute(String value,
TruffleString.Encoding encoding)
Creates a
TruffleString from a Java string, re-using its internal byte array if
possible. |
static TruffleString.FromJavaStringNode |
getUncached()
Get the uncached version of
TruffleString.FromJavaStringNode . |
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 TruffleString execute(String value, TruffleString.Encoding encoding)
TruffleString
from a Java string, re-using its internal byte array if
possible.public abstract TruffleString execute(String value, int charOffset, int length, TruffleString.Encoding encoding, boolean copy)
TruffleString
from a given region in a Java string, re-using its
internal byte array if possible and the region covers the entire string. If copy
is false
, the Java string's internal byte array will be re-used even if the
region does not cover the entire string. Note that this will keep the Java string's byte
array alive as long as the resulting TruffleString
is alive.public static TruffleString.FromJavaStringNode create()
TruffleString.FromJavaStringNode
.public static TruffleString.FromJavaStringNode getUncached()
TruffleString.FromJavaStringNode
.