java - Provider for custom annotation -


how google guice create provider custom annotations.

@superanno object test - custom annotation

if annotation find, system automatically call provider convert

in guice module:

@provides @superanno object get() {     return myobject.getinstance(); // example } 

in main class:

@inject @superanno object injectedobject;  public dostuff() {     // stuff injected field } 

i recommend using more specific type object. question not entirely clear me used object since seems wanted to. please explain question further if not answer it.


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

ruby - How do I merge two hashes into a hash of arrays? -