# Option

`com.jsmacrosce.jsmacros.core.config.Option`

Configures how an annotated configuration field or method is presented in the settings editor.  
 ```js
const Config = Java.type("com.jsmacrosce.jsmacros.core.config.CoreConfigV2");  
const Option = Java.type("com.jsmacrosce.jsmacros.core.config.Option");  
const metadata = Config.class.getField("maxLockTime").getAnnotation(Option.class);  
Chat.log(metadata.translationKey() + ": " + metadata.type().value());  
 ```

## Methods

### getter {#com.jsmacrosce.jsmacros.core.config.Option_getter-}

```js
getter(): String
```

Returns the declared no-argument getter method name for an annotated field, or empty to read that field directly. An annotated method is used as the getter regardless of this element.

**Returns:** getter method name, or empty when none is specified

### group {#com.jsmacrosce.jsmacros.core.config.Option_group-}

```js
group(): String[]
```

Returns the ordered category path in which the setting appears.

**Returns:** category path segments

### options {#com.jsmacrosce.jsmacros.core.config.Option_options-}

```js
options(): String
```

Returns the declared no-argument method name supplying choices for the setting, or empty when no provider is specified. The named method returns a `List` of choices. Without a provider, enum settings use their constants; non-enum settings have no choices.

**Returns:** choice-provider method name, or empty when none is specified

### setter {#com.jsmacrosce.jsmacros.core.config.Option_setter-}

```js
setter(): String
```

Returns the declared setter method name, or empty to use direct field assignment for an annotated field.  
 A named setter takes one argument matching the annotated field type or, for an annotated method, its return type.

**Returns:** setter method name, or empty when none is specified

### translationKey {#com.jsmacrosce.jsmacros.core.config.Option_translationKey-}

```js
translationKey(): String
```

Returns the translation key used for the setting's label.

**Returns:** the label translation key

### type {#com.jsmacrosce.jsmacros.core.config.Option_type-}

```js
type(): OptionType
```

Returns the setting editor kind and its kind-specific metadata.

**Returns:** editor-kind and option metadata; by default the kind is `"primitive"` with no extra options
