Skip to content

Recursive instantiation? #7

Description

@Nachtfeuer

Hi,

If class C is using @Inject B b; and class B is using @Inject A a ...
C c = feather.instance(C.class);
feather.injectFields(c);

If I don't call injectFields I have an instance of class C but 'c.b' is null.
If I call injectFields then I have c.b is not null but c.b.a is null.

Does that make sense? I don't wanna pass the feather instance through
whole hierarchy or using it as singleton and the calling injectFields on
each node in the hierarchy.

Maybe I'm doing something wrong?
Any comments on this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions