ScriptParameter (install4j API)
Description: declaration: package: com.install4j.api.beaninfo, class: ScriptParameter

# Class ScriptParameter

java.lang.Object
com.install4j.api.beaninfo.ScriptParameter

public class ScriptParameter extends Object
Descriptor for script parameters of script properties defined with a `ScriptPropertyDescriptor`.

See Also:
  - `ScriptProperty`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScriptParameter(String parameterName, Class parameterClass)`
  Create a script parameter.
  `ScriptParameter(String parameterName, ParameterizedType parameterizedType)`
  Create a script parameter with a generic type.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Class`
  `getParameterClass()`
  Get the parameter class.
  `String`
  `getParameterName()`
  Get the parameter name
  `Type`
  `getParameterType()`
  Get the parameter type

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### ScriptParameter

    public ScriptParameter(String parameterName, Class parameterClass)
    Create a script parameter.
    Parameters:
      `parameterName` - the parameter name
      `parameterClass` - the parameter class

  - ### ScriptParameter

    public ScriptParameter(String parameterName, ParameterizedType parameterizedType)
    Create a script parameter with a generic type. Getting a concrete generic type requires some work, for example, to get a type for `List&lt;String&gt;`, you define a helper interface

          private interface StringList extends List&lt;String[]&gt; {}

    and query the generic super-interface to get the desired generic type:

          (ParameterizedType)StringArrayList.class.getGenericInterfaces()[0]

    Parameters:
      `parameterName` - the parameter name
      `parameterizedType` - the parameter type

- ## Method Details

  - ### getParameterName

    public String getParameterName()
    Get the parameter name
    Returns:
      the name

  - ### getParameterClass

    public Class getParameterClass()
    Get the parameter class. If the script parameter has been created with a parameterized type, this returns the raw type.
    Returns:
      the class

  - ### getParameterType

    public Type getParameterType()
    Get the parameter type
    Returns:
      the type