Package de.gebit.integrity.ui.utils

## Class FixtureTypeWrapper

- java.lang.Object
- - de.gebit.integrity.ui.utils.FixtureTypeWrapper

-     public class FixtureTypeWrapper
      extends Object

  Wrapper used in a similar fashion as the `FixtureWrapper`. It encapsulates an IType object and provides methods required when accessing the type during autocompletion etc.
  Author:
    Rene Schneider - initial API and implementation

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FixtureTypeWrapper​(org.eclipse.jdt.core.IType aFixtureType)` | Creates a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `convertParameterValuesToFixtureDefinedTypes​(String aFixtureMethodName, Map<String,​Object> aParameterMap, List<String> aParameterPath, boolean anIncludeArbitraryParametersFlag)` | Replaces all values in the given parameter map with converted versions that match the types that are expected by the given fixture method.
    `Object` | `convertResultValueToFixtureDefinedType​(String aFixtureMethodName, ResultName aResultName, ValueOrEnumValueOrOperationCollection aValue)` | Converts a given result value (collection) to a fixture-method-defined result type.
    `protected org.eclipse.jdt.core.IMethod` | `findMethod​(String aMethodName)` | Finds a method with a specific name in the encapsulated type.
    `ArbitraryParameterEnumerator` | `instantiateArbitraryParameterEnumerator()` | Determines the `ArbitraryParameterEnumerator` class to use for the encapsulated fixture type and instantiates it.
    `CustomProposalProvider` | `instantiateCustomProposalProvider()` | Determines the `CustomProposalProvider` class to use for the encapsulated fixture type and instantiates it.
    `boolean` | `isArbitraryParameterFixtureClass()` | Checks whether the encapsulated type is an arbitrary parameter fixture class.
    `boolean` | `isCustomProposalFixtureClass()` | Checks whether the encapsulated type is a custom proposal fixture class.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FixtureTypeWrapper

          public FixtureTypeWrapper​(org.eclipse.jdt.core.IType aFixtureType)

      Creates a new instance.
      Parameters:
        `aFixtureType` - the type to encapsulate

  - ### Method Detail

    - #### findMethod

          protected org.eclipse.jdt.core.IMethod findMethod​(String aMethodName)
                                                     throws org.eclipse.jdt.core.JavaModelException

      Finds a method with a specific name in the encapsulated type.
      Parameters:
        `aMethodName` - the method name to find
      Returns:
        the method if found, null if not
      Throws:
        `org.eclipse.jdt.core.JavaModelException`

    - #### convertParameterValuesToFixtureDefinedTypes

          public void convertParameterValuesToFixtureDefinedTypes​(String aFixtureMethodName,
                                                                  Map<String,​Object> aParameterMap,
                                                                  List<String> aParameterPath,
                                                                  boolean anIncludeArbitraryParametersFlag)
                                                           throws org.eclipse.jdt.core.JavaModelException,
                                                                  ParameterUtil.UnresolvableVariableException,
                                                                  UnexecutableException

      Replaces all values in the given parameter map with converted versions that match the types that are expected by the given fixture method.
      Parameters:
        `aFixtureMethodName` - the method name
        `aParameterMap` - the parameter map
        `aParameterPath` - the path inside a nested object, if applicable
        `anIncludeArbitraryParametersFlag` - whether arbitrary parameters shall be included
      Throws:
        `org.eclipse.jdt.core.JavaModelException`
        `UnexecutableException`
        `ParameterUtil.UnresolvableVariableException`

    - #### convertResultValueToFixtureDefinedType

          public Object convertResultValueToFixtureDefinedType​(String aFixtureMethodName,
                                                               ResultName aResultName,
                                                               ValueOrEnumValueOrOperationCollection aValue)
                                                        throws org.eclipse.jdt.core.JavaModelException

      Converts a given result value (collection) to a fixture-method-defined result type. This won't do any variable replacement, since it's designed to be used inside Eclipse!
      Parameters:
        `aFixtureMethodName` - the method name
        `aResultName` - the name of the result (may be null if the default result is meant)
        `aValue` - the value to convert
      Returns:
        the converted value
      Throws:
        `org.eclipse.jdt.core.JavaModelException`

    - #### isArbitraryParameterFixtureClass

          public boolean isArbitraryParameterFixtureClass()

      Checks whether the encapsulated type is an arbitrary parameter fixture class.
      Returns:

    - #### instantiateArbitraryParameterEnumerator

          public ArbitraryParameterEnumerator instantiateArbitraryParameterEnumerator()

      Determines the `ArbitraryParameterEnumerator` class to use for the encapsulated fixture type and instantiates it.
      Returns:
        the enumerator or null if the class isn't an arbitrary fixture class or if there is no matching enumerator class found in the workspace

    - #### isCustomProposalFixtureClass

          public boolean isCustomProposalFixtureClass()

      Checks whether the encapsulated type is a custom proposal fixture class.
      Returns:

    - #### instantiateCustomProposalProvider

          public CustomProposalProvider instantiateCustomProposalProvider()

      Determines the `CustomProposalProvider` class to use for the encapsulated fixture type and instantiates it.
      Returns:
        the custom proposal provider