Package com.oracle.truffle.api.strings
Class TruffleString.CopyToByteArrayNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.CopyToByteArrayNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to copy a region of a string into a byte array. See
execute(AbstractTruffleString, int, byte[], int, int, TruffleString.Encoding)
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.CopyToByteArrayNode
.abstract void
execute
(AbstractTruffleString a, int byteFromIndexA, byte[] dst, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Copy a region of the givenTruffleString
a
, bounded bybyteFromIndexA
andbyteLength
into the given byte array, at starting atbyteFromIndexDst
.final byte[]
execute
(AbstractTruffleString string, TruffleString.Encoding expectedEncoding) Copy the entire string to a byte[] and return it.Get the uncached version ofTruffleString.CopyToByteArrayNode
.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
Copy the entire string to a byte[] and return it.- Since:
- 22.2
-
execute
public abstract void execute(AbstractTruffleString a, int byteFromIndexA, byte[] dst, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Copy a region of the givenTruffleString
a
, bounded bybyteFromIndexA
andbyteLength
into the given byte array, at starting atbyteFromIndexDst
.- Since:
- 22.1
-
create
Create a newTruffleString.CopyToByteArrayNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.CopyToByteArrayNode
.- Since:
- 22.1
-