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? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -