public class ConstantBindingParameterPlugin extends Object implements ParameterPlugin
ParameterPlugin that binds constant values to some parameters.| Modifier and Type | Field and Description |
|---|---|
private Object[] |
constantArgs |
private MetaAccessProvider |
metaAccess |
private SnippetReflectionProvider |
snippetReflection |
| Constructor and Description |
|---|
ConstantBindingParameterPlugin(Object[] constantArgs,
MetaAccessProvider metaAccess,
SnippetReflectionProvider snippetReflection)
Creates a plugin that will create
ConstantNodes for each parameter with an index
equal to that of a non-null object in constantArgs (from which the
ConstantNode is created if it isn't already a ConstantNode). |
| Modifier and Type | Method and Description |
|---|---|
FloatingNode |
interceptParameter(GraphBuilderContext b,
int index,
Stamp stamp) |
private final Object[] constantArgs
private final MetaAccessProvider metaAccess
private final SnippetReflectionProvider snippetReflection
public ConstantBindingParameterPlugin(Object[] constantArgs, MetaAccessProvider metaAccess, SnippetReflectionProvider snippetReflection)
ConstantNodes for each parameter with an index
equal to that of a non-null object in constantArgs (from which the
ConstantNode is created if it isn't already a ConstantNode).public FloatingNode interceptParameter(GraphBuilderContext b, int index, Stamp stamp)
interceptParameter in interface ParameterPlugin