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

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -