10000 Provide constructor injection and setter injection (?) · Issue #204 · androidannotations/androidannotations · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Provide constructor injection and setter injection (?) #204

@pyricau

Description

@pyricau

We currently force the users to have at least package private (default) scopes for their fields. Some users might not appreciate that. We could allow constructor injection / setter injection, this way :

@EBean
public class MyBean {

  private View myView;

  private MyOtherBean myOtherBean;

  MyBean(@Bean MyOtherBean myOtherBean) {
    this.myOtherBean = myOtherBean;
  }

  void setMyView(@ViewById View myView) {
    this.myView = myView;
  }

}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0