Class VilArgumentProvider
- java.lang.Object
-
- net.ssehub.easy.producer.core.mgmt.VilArgumentProvider
-
public abstract class VilArgumentProvider extends java.lang.ObjectAn argument provider for VIL execution. This class provides an extension point for EASy plugins.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private booleanactiveprivate static java.util.List<VilArgumentProvider>instances
-
Constructor Summary
Constructors Constructor Description VilArgumentProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanacceptsFreeArguments()Returns whether this provider accepts free arguments.static voidadd(VilArgumentProvider provider)Adds an argument provider.abstract java.lang.StringgetFreeArguments()Returns the free arguments used by this instance.abstract java.lang.StringgetName()Returns the name of this provider.abstract java.lang.StringgetParameterName()Returns the name(s) of the parameter(s) provided by this instance.abstract java.lang.StringgetParameterType()Returns the type(s) of the parameter(s) provided by this instance.static VilArgumentProvidergetProvider(int index)Returns the provider specified by the given index.static intgetProviderCount()Returns the number of providers.static java.util.Iterator<VilArgumentProvider>instances()Returns all registered instances as an iterator.booleanisActive()Returns whether this provider is active.static voidprovideArguments(PLPInfo plp, net.ssehub.easy.instantiation.core.model.execution.Executor executor)Provides arguments via the registered argument providers.protected abstract voidprovideArgumentsImpl(PLPInfo plp, net.ssehub.easy.instantiation.core.model.execution.Executor executor)Actually provides the arguments forexecutor.static voidremove(VilArgumentProvider provider)Removes an argument provider.voidsetActive(boolean active)Changes the active state of this provider.abstract voidsetFreeArguments(java.lang.String arguments)Defines the free arguments to be used by this instance.
-
-
-
Field Detail
-
instances
private static java.util.List<VilArgumentProvider> instances
-
active
private boolean active
-
-
Method Detail
-
add
public static void add(VilArgumentProvider provider)
Adds an argument provider.- Parameters:
provider- the argument provider to be added
-
remove
public static void remove(VilArgumentProvider provider)
Removes an argument provider.- Parameters:
provider- the argument provider to be removed
-
provideArguments
public static void provideArguments(PLPInfo plp, net.ssehub.easy.instantiation.core.model.execution.Executor executor)
Provides arguments via the registered argument providers.- Parameters:
plp- the PLP to add arguments forexecutor- the executor to be provided with arguments
-
getProviderCount
public static int getProviderCount()
Returns the number of providers.- Returns:
- the number of providers
-
getProvider
public static VilArgumentProvider getProvider(int index)
Returns the provider specified by the given index.- Parameters:
index- the 0-based index of the provider to return- Returns:
- the provider
- Throws:
java.lang.IndexOutOfBoundsException- ifindex < 0 || index >=getProviderCount()
-
instances
public static java.util.Iterator<VilArgumentProvider> instances()
Returns all registered instances as an iterator.- Returns:
- all provider instances
-
provideArgumentsImpl
protected abstract void provideArgumentsImpl(PLPInfo plp, net.ssehub.easy.instantiation.core.model.execution.Executor executor)
Actually provides the arguments forexecutor.- Parameters:
plp- the PLP to add arguments forexecutor- the executor to be provided with arguments
-
getParameterName
public abstract java.lang.String getParameterName()
Returns the name(s) of the parameter(s) provided by this instance. The returned information is just for displaying information to the user.- Returns:
- the name(s) of the parameters(s)
-
getParameterType
public abstract java.lang.String getParameterType()
Returns the type(s) of the parameter(s) provided by this instance. The returned information is just for displaying information to the user.- Returns:
- the type(s) of the parameters(s)
-
getName
public abstract java.lang.String getName()
Returns the name of this provider. The returned information is just for displaying information to the user.- Returns:
- the name of this provider
-
acceptsFreeArguments
public abstract boolean acceptsFreeArguments()
Returns whether this provider accepts free arguments.- Returns:
trueif it accepts free arguments,falseelse- See Also:
setFreeArguments(String),getFreeArguments()
-
getFreeArguments
public abstract java.lang.String getFreeArguments()
Returns the free arguments used by this instance.- Returns:
- the free arguments or null or an empty string if there are none
- See Also:
setFreeArguments(String),acceptsFreeArguments()
-
setFreeArguments
public abstract void setFreeArguments(java.lang.String arguments)
Defines the free arguments to be used by this instance.- Parameters:
arguments- the arguments (in the format supported by this instance)- See Also:
acceptsFreeArguments(),getFreeArguments()
-
isActive
public boolean isActive()
Returns whether this provider is active.- Returns:
trueif it is active,falseelse
-
setActive
public void setActive(boolean active)
Changes the active state of this provider.- Parameters:
active-trueif this provider is active,falseelse
-
-