# OptionValues

@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Inherited
annotation class OptionValues(source)

Marks a method on a org.gradle.api.Task as providing the possible values for a `String` or `List<String>`Option. At most one option values method may be provided for a particular option.

This annotation should be attached to a getter method that returns a java.util.Collection of possible values. The entries in the collection may be of any type. If necessary, they are transformed into Strings by calling `toString()`.

#### Since

4.6

## Functions

annotationType
Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
equals
Link copied to clipboard
abstract fun equals(p: Any): Boolean
hashCode
Link copied to clipboard
abstract fun hashCode(): Int
toString
Link copied to clipboard
abstract fun toString(): String
value
Link copied to clipboard
abstract fun value(): Array<String>
The names of the options for which the method provides the possible values.