Class PluginParameterBinding.Factory
java.lang.Object
org.processmining.framework.plugin.PluginParameterBinding.Factory
- Enclosing class:
- PluginParameterBinding
Factory for instantiating PluginParameterBindings binding plugins with a
given input.
- Author:
- bfvdonge
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<PluginParameterBinding>
tryToBind
(PluginManager manager, PluginDescriptor plugin, int methodIndex, boolean mustBeTotal, boolean orderedParameters, Class<?>... parameterTypes) This method instantiates binding objects binding the method and indexmethodIndex
of the given plugin to the given set of parameter types, if possible.
-
Method Details
-
tryToBind
public static List<PluginParameterBinding> tryToBind(PluginManager manager, PluginDescriptor plugin, int methodIndex, boolean mustBeTotal, boolean orderedParameters, Class<?>... parameterTypes) This method instantiates binding objects binding the method and indexmethodIndex
of the given plugin to the given set of parameter types, if possible. If no binding is possible, an empty list is returned. If a total binding is requested (indicated bymustBeTotal == true
), then the returned binding assigns objects from the given parameters to all inputParameters of the plugin method. If no total binding is required, the resulting bindings is not necessarily executable, as the method bound might require more input. However, all provided parameterTypes are bound to a parameter. Using the flagorderedParameters
the user can request bindings that consider the given parameters, in the given order only, i.e. no reordering is done. Any bindingb
returned withorderedParameters == true
will satisfy the property thatb.getBinding()[i] == i
for alli
.- Parameters:
plugin
- the plugin for which to try to bind the parametersmustBeTotal
- indicating whether the resulting binding should be totalorderedParameters
- whether or not the parameters are ordered.parameterTypes
- the available types to be distributed over the parameters. Note that if one of the objects is a Object[] then, this array will be kept as one. Multiple objects of type T, might end up in an array of type S super T, i.e. they can be bound into one S[] to be passed to a single element of plugin.getTypes()- Returns:
- A list of length 0 if no binding exists, or a list of length 1 if a binding exists. Note that this may change in the future to lists of length n.
-