# additionalData

abstract fun <T : AdditionalData?> additionalData(type: Class<T>, config: Action<in T>): ProblemSpec(source)

Declares additional data attached to the problem.

#### Return

this

#### Since

8.13

#### Parameters

type

The type of the additional data. This can be any type that implements AdditionalData including `abstract` classes and interfaces. This type will be instantiated and provided as an argument for the `Action` passed as the second argument.

The limitations for this type are:

- Only `get<VALUE>` and `set<VALUE>` methods are allowed.
- These are only allowed to use these types:
  - `String`
  - `Boolean`
  - `Character`
  - `Byte`
  - `Short`
  - `Integer`
  - `Float`
  - `Long`
  - `Double`
  - `BigInteger`
  - `BigDecimal`
  - `File`

config

The configuration action for the additional data.

#### Throws

IllegalArgumentException

if the conditions for the type are not met or if a different type for the same problem id is used.