Alias for kotlin @Interface

Viewed 239

I'm using in my project AndroidFindByChainSet annotation many times which looks like:

@Target({ElementType.TYPE, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface AndroidFindByChainSet {
    AndroidFindBys[] value();
}

Is it possible to create an alias for this annotation or create a new one that will be extending this one? I'm asking because I'm using it quite often in the same way:

@AndroidFindByChainSet(
        AndroidFindBys(
            AndroidBy(id = "SomethingA"),
            AndroidBy(id = "SomethingB")
        )
    )

the second id is always the same so I'm changing only the first one. So something like: @CustomFind(AndroidBy(id = "SomethingA")) would be great.

0 Answers
Related