Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Possibility of Dependency InjectionΒ #5

Open
@FormallyMyles

Description

Hi!

A lot of modern APIs use dependency injection, and it's not a bad idea when it's used right and does not cause latency and what (Resolving those dependencies).

Would this project consider that?

eg.

@Plugin(name = "An addition to the Amazing Test Plugin", id = "testPlugin2", author = "myles")
public class TestPlugin {
    @Inject
    Logger logger;

    @EventHandler
    public void onEnable(ServerStartEvent event) {
        logger.info("The magic of a logger!");
    }

}

An example of a library that implements this is Guice (https://github.com/google/guice/wiki/GettingStarted), Sponge currently uses this also.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions