Class ParameterUtil

java.lang.Object
de.gebit.integrity.utils.ParameterUtil

public final class ParameterUtil extends Object
A utility class for handling of test/call/suite parameters.
Author:
Rene Schneider - initial API and implementation
  • Field Details

    • DEFAULT_PARAMETER_NAME

      public static final String DEFAULT_PARAMETER_NAME
      The "fake" name of the default parameter. This is used for unnamed parameters in maps which require a non-null key.
      See Also:
    • INEXISTENT_VALUE

      public static final String INEXISTENT_VALUE
      A fixed result "value" object indicating that a result value actually did not even exist in the named results returned by a fixture (not even with a "null" value, which is a different kind of statement).
      See Also:
    • EMPTY_VALUE

      public static final String EMPTY_VALUE
      A fixed result "value" object indicating that a result value was an empty collection.
      See Also:
  • Method Details

    • getValuesFromNamedResultContainer

      public static Map<String,Object> getValuesFromNamedResultContainer(Object aContainer) throws IntrospectionException, IllegalArgumentException, IllegalAccessException, InvocationTargetException
      Returns a map of named result names to values acquired from a given named result container. This container is assumed to be a simple Java Bean, with accessible accessor methods useable to retrieve the values of fields. The field names are used as result names and thus keys in the map. Unreachable fields are ignored.
      Parameters:
      aContainer - the container instance
      Returns:
      the map of result names to values
      Throws:
      IntrospectionException - the introspection exception
      IllegalArgumentException - the illegal argument exception
      IllegalAccessException - the illegal access exception
      InvocationTargetException - the invocation target exception
    • getResultTypeFromNamedResultContainerType

      public static Class<?> getResultTypeFromNamedResultContainerType(Class<?> aContainerType, String aResultName) throws IntrospectionException
      Determines the result type by looking at a result container type for a specific result name.
      Parameters:
      aContainerType - the container type
      aResultName - the name of the result
      Returns:
      the result type
      Throws:
      IntrospectionException - the introspection exception
    • getVariableEntitiesForSuiteParameters

      public static List<VariableEntity> getVariableEntitiesForSuiteParameters(SuiteDefinition aSuite)
      Determines a list of all VariableEntitys referenced in a suites' parameter list.
      Parameters:
      aSuite -
      Returns: