Back to directory

Avaje-Inject

Avaje-Inject is an annotation-processor-based dependency-injection library for server-side Java and Kotlin, generating wiring code at compile time instead of relying on runtime reflection or classpath scanning.

Avaje-Inject

Avaje-Inject performs dependency injection for server-side Java and Kotlin applications using annotation processing at compile time, rather than reflection or classpath scanning at runtime, so applications start faster and with lower overhead. A class marked @Singleton has its dependencies supplied through its constructor, and a @Factory class with @Bean methods can provide instances that are not themselves annotated; a BeanScope built at startup then resolves and returns instances by type.

The annotation processor determines the dependency wiring order and generates an AvajeModule class that wires everything together, avoiding a separate reflection-based startup scan. Compared with Dagger, which it otherwise resembles in its annotation-processing and code-generation approach, Avaje-Inject targets server-side rather than Android development, adds component testing through a companion avaje-inject-test module and @InjectTest annotation, an API for retrieving every bean implementing a given interface, and @PostConstruct and @PreDestroy lifecycle callbacks.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.