2

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.

falsetto
  • 789
  • 2
  • 11
  • 35
  • You can create an import alias `import com.package.AndroidFindByChainSet as Afbcs`, but no, you can't extend or inherit from it. – Nicolas Dec 22 '20 at 13:12

0 Answers0