Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Provider<T> #3

Closed
rbygrave opened this issue Nov 11, 2018 · 1 comment
Closed

Add support for Provider<T> #3

rbygrave opened this issue Nov 11, 2018 · 1 comment
Assignees
Milestone

Comments

@rbygrave
Copy link
Contributor

import javax.inject.Provider;
import javax.inject.Singleton;

@Singleton
public class FooProvider implements Provider<Foo> {

  private final SomeDependency bar;

  FooProvider(SomeDependency bar) {
    this.bar = bar;
  }

  @Override
  public Foo get() {
    ...
    return new Foo(...);
  }
}

And then Foo is a bean that can be injected into other beans.

@rbygrave
Copy link
Contributor Author

The change for this is in kanuka-generator ... the provider get() method is basically the same as:

import io.kanuka.Bean;
import io.kanuka.Factory;

@Factory
public class FooProvider  {

  private final SomeDependency bar;

  FooProvider(SomeDependency bar) {
    this.bar = bar;
  }

  @Bean
  public Foo get() {
    ...
    return new Foo(...);
  }
}

rbygrave added a commit that referenced this issue Nov 11, 2018
@rbygrave rbygrave self-assigned this Nov 11, 2018
@rbygrave rbygrave added this to the 0.3 milestone Nov 11, 2018
rbygrave added a commit that referenced this issue Feb 9, 2023
commit 2b20e1b
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Wed Feb 8 18:45:55 2023 -0500

    order constants

commit 80dcb5c
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Wed Feb 8 18:35:12 2023 -0500

    Update pom.xml

commit a4e0de9
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Wed Feb 8 17:47:57 2023 -0500

    use avaje prism (it works, but is not deployed)

commit e051806
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 19:04:25 2023 -0500

    Update module-info.java

commit df99f4b
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 19:04:09 2023 -0500

    Update module-info.java

commit ce72b23
Merge: ad3f269 df12d0c
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 18:57:45 2023 -0500

    Merge branch 'prism' of https://github.com/SentryMan/avaje-inject into prism

commit ad3f269
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 18:57:29 2023 -0500

    static inject

commit df12d0c
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 18:48:12 2023 -0500

    static requires

commit d09c0e2
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 18:14:25 2023 -0500

    don't need prism module

commit b23e7f0
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 18:04:34 2023 -0500

    Update ExternalProvider.java

commit 84da34b
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 17:57:38 2023 -0500

    fix module

commit 2e9008e
Merge: 6e65622 91c5da2
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 17:55:29 2023 -0500

    Merge branch 'prism2' into prism

commit 91c5da2
Merge: 2ee8553 2b0f8d4
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 17:55:04 2023 -0500

    Merge pull request #3 from agentgt/prism

    Switch to generating module-info for prisms

commit 6e65622
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 17:47:15 2023 -0500

    rc5

commit 2b0f8d4
Author: Adam Gent <adam.gent@snaphop.com>
Date:   Tue Feb 7 17:30:33 2023 -0500

    Switch to generating module-info for prisms

commit ca6c9e5
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 17:01:32 2023 -0500

    minor stuff

commit 6f896d7
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 16:52:31 2023 -0500

    fix test

commit 5f8b4bf
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 16:45:17 2023 -0500

    compiles

commit e7577ca
Merge: b932fd8 2ee8553
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 15:42:27 2023 -0500

    Merge remote-tracking branch 'origin/prism2' into prism

commit 2ee8553
Merge: 8258618 a121495
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 15:34:49 2023 -0500

    Merge pull request #2 from agentgt/prism

    Merge prism changes

commit b932fd8
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 15:01:46 2023 -0500

    Update pom.xml

commit 585e707
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 15:01:29 2023 -0500

    Update pom.xml

commit f876306
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 14:49:31 2023 -0500

    external

commit a121495
Author: Adam Gent <adam.gent@snaphop.com>
Date:   Tue Feb 7 14:53:57 2023 -0500

    Move prisms to new module

commit 13c8300
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Tue Feb 7 13:21:45 2023 -0500

    working

commit 65c022e
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Mon Feb 6 21:48:57 2023 -0500

    Update pom.xml

commit 264d51d
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Mon Feb 6 21:47:12 2023 -0500

    sorta work

commit 8258618
Merge: 244360d 12eba7f
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Mon Feb 6 09:56:59 2023 -0500

    Merge remote-tracking branch 'upstream/master'

commit 244360d
Author: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date:   Thu Feb 2 18:17:12 2023 -0500

    Update pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant