in Groovy means "access the field with that name directly".
If you for example have a property that consist of a field "foo" and a getter "getFoo", then in Groovy using
.foo
will call the
getFoo
getter, but with
.@foo
you can directly access the field without going through the getter.
Same works here for the companion object to access the static field called
Companion
instead of the nested class called
Companion
.
h
hfhbd
04/04/2024, 4:15 PM
Thanks for the explanation. Don't know why I did found it when I tried to duckduckgo it... Interesting