Annotation Type AliasOf


  • @Target(ANNOTATION_TYPE)
    @Retention(CLASS)
    public @interface AliasOf
    Defines an alias between an existing Hilt scope and the annotated scope. For example, the following code makes @MyScope a functional replacement for @ActivityScope.

       @Scope
       @AliasOf(ActivityScope.class)
       public @interface MyScope{}
     

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.Class<? extends java.lang.annotation.Annotation>[] value
      Returns the existing Hilt scope(s) that the annotated scope is aliasing.
    • Element Detail

      • value

        java.lang.Class<? extends java.lang.annotation.Annotation>[] value
        Returns the existing Hilt scope(s) that the annotated scope is aliasing.