Package com.oracle.truffle.api.strings
Class TruffleString.FromCodePointNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.FromCodePointNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to create a new
TruffleString
from a single codepoint.- 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.FromCodePointNode
.final TruffleString
execute
(int codepoint, TruffleString.Encoding encoding) Creates a new TruffleString from a given code point.abstract TruffleString
execute
(int codepoint, TruffleString.Encoding encoding, boolean allowUTF16Surrogates) Creates a new TruffleString from a given code point.Get the uncached version ofTruffleString.FromCodePointNode
.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 new TruffleString from a given code point.- Since:
- 22.1
-
execute
public abstract TruffleString execute(int codepoint, TruffleString.Encoding encoding, boolean allowUTF16Surrogates) Creates a new TruffleString from a given code point. IfallowUTF16Surrogates
istrue
,UTF-16 surrogate values
passed ascodepoint
will not result in anull
return value, but instead be encoded on a best-effort basis. This option is only supported onTruffleString.Encoding.UTF_16
andTruffleString.Encoding.UTF_32
.- Returns:
- a new
TruffleString
, ornull
if the given codepoint is not defined in the given encoding. - Since:
- 22.2
-
create
Create a newTruffleString.FromCodePointNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.FromCodePointNode
.- Since:
- 22.1
-