In package com.eden.orchid.api.registration

public abstract class OrchidModule extends AbstractModule

since: v1.0.0 public abstract

Orchid is built on top of the Guice Dependency Injection framework by Google. This framework allows for runtime discovery and injection of dependencies and multibindings, making it ideal for a runtime-plugin-driven framework like Orchid.

The OrchidModule adds several convenience methods useful for registering classes within Orchid. It is not necessary to extend OrchidModule, any class that implements the Guice Module interface and has a public no-arg constructor can be used with Orchid, allowing for maximum interoperability with other libraries. In addition, since Guice is a complete implementation of the JSR-330 interface, even libraries that have been set up for Dependency Injection apart from Guice can be used seamlessly simply by adding the necessary bindings within a Guice Module.

Constructors

OrchidModule() public

Methods

AbstractModule of(Class<T> injectedClass, Object value) static public

Type Parameters:
Type Parameters
Parameters:
  • Class injectedClass
  • Object value
void addToSet(Class<T> setClass) final public

Type Parameters:
Type Parameters
Parameters:
  • Class setClass
void addToSet(Class<T> setClass, Class<T> objectClasses) final public
Method Annotations:
@SafeVarargs

Type Parameters:
Type Parameters
Parameters:
  • Class setClass
  • Class objectClasses
void addToSet(Class<T> setClass, Object objects) final public
Method Annotations:
@SafeVarargs

Type Parameters:
Type Parameters
Parameters:
  • Class setClass
  • Object objects
AnnotatedBindingBuilder<T> _bind(Class<T> clazz) public

Type Parameters:
Type Parameters
Parameters:
  • Class clazz