All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arellomobile.mvp.presenter.ProvidePresenter Maven / Gradle / Ivy

package com.arellomobile.mvp.presenter;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Called when Moxy can't find right presenter instance in {@link com.arellomobile.mvp.PresenterStore}.
 * 

Attention! Don't use manually method marked with this annotation! Use presenter field, which you want. If you override this method in inherited classes, make them return same type(not requirements but recommendation).

*

Requirements:

*
    *
  • Method should return full equals class as presenter field type
  • *
  • Presenter Types should be same
  • *
  • Tags should be equals
  • *
  • Presenter IDs should be equals
  • *
*

Note: if this method stay unused after build, then Moxy never use this method and you should check annotation parameters. These parameters should be equals to @InjectPresenter parameters

*
* Date: 14.10.2016 * Time: 00:09 * * @author Yuri Shmakov */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface ProvidePresenter { String EMPTY = ""; String tag() default EMPTY; PresenterType type() default PresenterType.LOCAL; String presenterId() default EMPTY; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy