Why are you using arrays there? Arrays are low-level data structures and should be used only where proper collections do not fit dues to performance considerations.
Two reasons:
- legacy. Java code had arrays there. It was rather convenient.
- i tried lists, but I do need unmodifiable ones and don't know how to connect them with java List. There is another question about this somewhere around. :)
I needed some method that returns several strings. Well, it's an array of tags that are required for a module to run. It is a constant list for a module. I only request them and then iterate through them.
So I’ve decided to go with the easiest way syntactically. Of course there were many possible solutions but that was the first that came into my mind. It was OK then.
And not it allowed me to find out about useful Kotlin annotations and several other things. I’ll rethink this solution based on these questions.