# @JvmField no longer inferred in RC EAPs?

**URL:** <https://discuss.kotlinlang.org/t/jvmfield-no-longer-inferred-in-rc-eaps/1446>\
**Category:** Support\
**Created:** [February 3, 2016, 1:14am UTC](https://discuss.kotlinlang.org/t/jvmfield-no-longer-inferred-in-rc-eaps/1446 "2016-02-03T01:14:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pniederw1](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pniederw1](https://discuss.kotlinlang.org/u/pniederw1)\
**Post date:** [February 3, 2016, 1:14am UTC](https://discuss.kotlinlang.org/t/jvmfield-no-longer-inferred-in-rc-eaps/1446/1 "2016-02-03T01:14:18Z")

</div>

After switching to 1.0.0-rc-1017, we now have to add explicit `@JvmField` in more places than before, e.g.:

```kotlin
class MyJunitTest {
  companion object {
    @ClassRule
    @JvmField
    val tempFolder = TemporaryFolder() 
  }

```

Is this change intentional? This is becoming quite verbose.

---

<div class="post-metadata">

**Author:** ![h0tk3y](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/h0tk3y/32/1781_2.png) [@h0tk3y](https://discuss.kotlinlang.org/u/h0tk3y)\
**Post date:** [February 3, 2016, 11:13am UTC](https://discuss.kotlinlang.org/t/jvmfield-no-longer-inferred-in-rc-eaps/1446/2 "2016-02-03T11:13:47Z")

</div>

It’s been announced and reasoned in [Beta Candidate](http://blog.jetbrains.com/kotlin/2015/10/kotlin-1-0-beta-candidate-is-out/), please see **@JvmField and objects** section.

---

<div class="post-metadata">

**Author:** ![pniederw1](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pniederw1](https://discuss.kotlinlang.org/u/pniederw1)\
**Post date:** [February 3, 2016, 5:31pm UTC](https://discuss.kotlinlang.org/t/jvmfield-no-longer-inferred-in-rc-eaps/1446/3 "2016-02-03T17:31:33Z")

</div>

Thanks for the pointer. Sounds like this stopped working a while ago, and I just didn’t notice until now.

It would be handy to have a way to define annotation aliases. This would allow to define a `@KotlinRule` annotation that would get translated into `@Rule` and `@JvmField` at compile time.

In Groovy this feature is called “annotation collectors”:

> **[AnnotationCollector (Groovy 4.0.4)](http://docs.groovy-lang.org/latest/html/api/groovy/transform/AnnotationCollector.html)**
>
> declaration: package: groovy.transform, annotation type: AnnotationCollector
