Class TruffleString.FromByteArrayNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.FromByteArrayNode
- All Implemented Interfaces:
NodeInterface,Cloneable
- Enclosing class:
TruffleString
Node to create a new
TruffleString from a byte array. See
execute(byte[], int, int, TruffleString.Encoding, boolean) for details.- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
Node.Child, Node.Children -
Method Summary
Modifier and TypeMethodDescriptioncreate()Create a newTruffleString.FromByteArrayNode.abstract TruffleStringexecute(byte[] value, int byteOffset, int byteLength, TruffleString.Encoding encoding, boolean copy) Creates a newTruffleStringfrom a byte array.final TruffleStringexecute(byte[] value, TruffleString.Encoding encoding) Creates a newTruffleStringfrom a byte array.final TruffleStringexecute(byte[] value, TruffleString.Encoding encoding, boolean copy) Creates a newTruffleStringfrom a byte array.Get the uncached version ofTruffleString.FromByteArrayNode.Methods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Method Details
-
execute
Creates a newTruffleStringfrom a byte array. Seeexecute(byte[], int, int, TruffleString.Encoding, boolean)for details.- Since:
- 22.1
-
execute
Creates a newTruffleStringfrom a byte array. Seeexecute(byte[], int, int, TruffleString.Encoding, boolean)for details.- Since:
- 22.1
-
execute
public abstract TruffleString execute(byte[] value, int byteOffset, int byteLength, TruffleString.Encoding encoding, boolean copy) Creates a newTruffleStringfrom a byte array. The array content is assumed to be encoded in the given encoding already. This operation allows non-copying string creation, i.e. the array parameter can be used directly by passingcopy = false. Caution:TruffleStringassumes the array to be immutable, do not modify the byte array after passing it to the non-copying variant of this operation!- Since:
- 22.1
-
create
Create a newTruffleString.FromByteArrayNode.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.FromByteArrayNode.- Since:
- 22.1
-