public abstract class CharMatcher
extends com.oracle.truffle.api.nodes.Node
| Modifier and Type | Field and Description |
|---|---|
static CharMatcher[] |
EMPTY |
| Constructor and Description |
|---|
CharMatcher() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
estimatedCost()
Conservatively estimate the equivalent number of integer comparisons of calling
CharMatcher.execute(char, boolean). |
abstract boolean |
execute(char c,
boolean compactString)
Check if a given character matches this
CharMatcher. |
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toStringpublic static final CharMatcher[] EMPTY
public abstract boolean execute(char c,
boolean compactString)
CharMatcher.c - any character.compactString - true if c was read from a compact string and can
therefore be treated as a byte. This parameter must always be partial
evaluation constant!true if the character matches.CompilerDirectives.isPartialEvaluationConstant(Object)public abstract int estimatedCost()
CharMatcher.execute(char, boolean).CharMatcher.execute(char, boolean) is
roughly equivalent to. Array loads are treated as two comparisons.