Skip to content

zhong-j-yu/od

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OD

OD is a simple Service Locator library for Java.

But why service locator? See In Defense of Service Locator.

Basic Usage

To lookup an object of a certain type, use OD.get(type)

  Foo foo = OD.get( Foo.class );

To bind the type to an object or a supplier, use OD.bind(type)

  OD.bind( Foo.class ).to( someInstance );  // bind to a singleton

  OD.bind( Foo.class ).to( FooImpl::new );  // bind to a supplier

Document - http://zhong-j-yu.github.io/od/

Download - od-1.0.0.jar

Java version - 6+

License - Public Domain

Discussion - https://groups.google.com/forum/#!forum/od-service-locator

About

Service Locator framework - multiple binding/lookup strategies

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages