public static class InstanceOfSnippetsTemplates.MaterializationUsageReplacer extends InstanceOfSnippetsTemplates.InstanceOfUsageReplacer
InstanceOfNode
or InstanceOfDynamicNode
that does
materializes the result of the type test.Modifier and Type | Field and Description |
---|---|
ConditionalNode |
usage |
falseValue, instanceOf, instantiation, trueValue
Constructor and Description |
---|
MaterializationUsageReplacer(InstanceOfSnippetsTemplates.Instantiation instantiation,
ValueNode trueValue,
ValueNode falseValue,
FloatingNode instanceOf,
ConditionalNode usage) |
Modifier and Type | Method and Description |
---|---|
void |
replace(ValueNode oldNode,
ValueNode newNode)
Replaces all usages of
oldNode with direct or indirect usages of newNode . |
void |
replaceUsingInstantiation()
Does the replacement based on a previously snippet instantiation.
|
public final ConditionalNode usage
public MaterializationUsageReplacer(InstanceOfSnippetsTemplates.Instantiation instantiation, ValueNode trueValue, ValueNode falseValue, FloatingNode instanceOf, ConditionalNode usage)
public void replaceUsingInstantiation()
InstanceOfSnippetsTemplates.InstanceOfUsageReplacer
replaceUsingInstantiation
in class InstanceOfSnippetsTemplates.InstanceOfUsageReplacer
public void replace(ValueNode oldNode, ValueNode newNode)
SnippetTemplate.UsageReplacer
oldNode
with direct or indirect usages of newNode
.