All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wamblee.inject.package-info Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2005-2010 the original author or authors.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * This package provides a mini-framework for interfacing to existing dependency injection 
 * mechanisms. This package does not provide dependency injection, but implementations are expected to 
 * implement it, usually by delegating to an existing dependency injection framework. The interfaces in this
 * package provide independence on the actual framework chosen and also allow for better testability. 
 * 
 * 

Users of the package

* *

Users of this package will typically use:

*
    *
  • Injector: This is the interface used to perform injection of dependencies into * a given object.
  • *
  • Injectable: By subclassing this class, the classes automatically get their * dependencies injected at construction.
  • *
  • InjectorBuilder: To get an instance of the Injector. *
  • *
* *

For example, to inject into a given object, use:

*
 *   Injector injector = InjectorBuilder.getInjector();
 *   MyPojo pojo = new MyPojo();
 *   injector.inject(pojo);
 * 
* *

Implementors of the package

* *

Of interest to implementations of this package integrating with dependency injection frameworks are:

*
    *
  • Injector: The main interface to be implemented is the {@link Injector}, by which injection is done.
  • *
  • InjectorFactory: Injectors are created by an implementation of the {@link InjectorFactory} which * creates injectors based on the class.
  • *
  • InjectorBuilder: Implementations must make their InjectorFactory * available through the ServiceLoader mechanism. *
  • *
* *

Class overview

* * */ package org.wamblee.inject;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy