Class CustomParameterSetter

  • All Implemented Interfaces:
    ParameterSetter

    public abstract class CustomParameterSetter
    extends Object
    implements ParameterSetter
    Extendable parameter setter to be used with the groovy based parameter builder. In addition to setting parameter's values this class is also responsible for creating the parameters that it manages. The RunState for the next run will be set prior to each run and implementations can thus use this RunState in their next etc. code.
    Author:
    Nick Collier
    • Constructor Detail

      • CustomParameterSetter

        protected CustomParameterSetter​(String name,
                                        Class parameterType)
        Construct a CustomParameterSetter.
        Parameters:
        name - the name of the parameter this setter will set
        parameterType - the type of the parameter this setter will set
    • Method Detail

      • init

        public void init​(RunState state)
        Initializes this CustomParameterSetter with the RunState for the next run.
        Parameters:
        state - the RunState for the next run.
      • getName

        public String getName()
        Gets the name of the parameter this setter will set.
        Returns:
        the name of the parameter this setter will set.
      • getParameterType

        public Class getParameterType()
        Gets the class of the parameter this setter will set.
        Returns:
        the class of the parameter this setter will set.
      • addParameters

        public abstract void addParameters​(ParametersCreator creator)
        Adds the parameters that this class is responsible for to the ParametersCreator factory. For example, a CustomParameterSetter will create the parameter that is directly responsible for setting (the one specified by the name property) and may create a derived parameter that is also set by this CustomParameterSetter.
        Parameters:
        creator - the factory used to create the parameters that this class manages