# additionalData

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

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 type can have the following properties:

- getters and setters for collections, simple types and other types that itself follow these restrictions
  - simple types: String, Integer, Boolean, etc.
  - collections: java.util.List, java.util.Set, java.util.Map
  - primitives: `int`, `boolean`, etc.
- Provider API types
  - org.gradle.api.provider.Property
  - org.gradle.api.provider.ListProperty
  - org.gradle.api.provider.SetProperty
  - org.gradle.api.provider.MapProperty

config

The configuration action for the additional data.