# Provide properties syntax for accessing Java getters/setters

**URL:** <https://discuss.kotlinlang.org/t/provide-properties-syntax-for-accessing-java-getters-setters/327>\
**Category:** Uncategorized\
**Created:** [February 25, 2015, 6:49pm UTC](https://discuss.kotlinlang.org/t/provide-properties-syntax-for-accessing-java-getters-setters/327 "2015-02-25T18:49:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![helpermethod](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@helpermethod](https://discuss.kotlinlang.org/u/helpermethod)\
**Post date:** [February 25, 2015, 6:49pm UTC](https://discuss.kotlinlang.org/t/provide-properties-syntax-for-accessing-java-getters-setters/327/1 "2015-02-25T18:49:21Z")

</div>

Hello,

I’ve just started creating a DSL in Kotlin and noticed that to set a field of a Java object I had to call the setter method, like so:

```kotlin
    person.setName("helpermethod")
```

I think it would be cool if I could modify the field from Kotlin as if it were a property, like

```kotlin
person.name = "helpermethod"
```

I think this would allow to write even cleaner DSLs, e.g.

```kotlin
person {
  name = "helpermethod"
}
```

instead of

```kotlin
person {
    setName("helpermethod")
}
```

---

<div class="post-metadata">

**Author:** ![abreslav](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/abreslav/32/8279_2.png) [@abreslav](https://discuss.kotlinlang.org/u/abreslav)\
**Post date:** [February 26, 2015, 12:51pm UTC](https://discuss.kotlinlang.org/t/provide-properties-syntax-for-accessing-java-getters-setters/327/2 "2015-02-26T12:51:44Z")

</div>

Splease subscribe to this issue: [https://youtrack.jetbrains.com/issue/KT-400](https://youtrack.jetbrains.com/issue/KT-400)
