Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

AutoInjector

Example library with Liberator

Overview

Here's example for usage:

  1. Create an interface:
publicinterfaceSomeMagic {
voidsend(Stringmsg);
}
  1. Implement the interface and here should be used the @Service annotation:
@ServicepublicclassSomeMagicImplimplementsSomeMagic {
@Overridepublicvoidsend(Stringmsg) {
System.out.println(msg);
}
}
  1. Inject with @AutoInject annotation:
//case 1: just one class implements interface@AutoInjectprivateSomeMagicmagic;
//case 2: more than one @AutoInject(SomeMagicImpl.class)
privateSomeMagicpureMagic;

Example project:

AutoInjectorExample

About

Example library with Liberator

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages