Created
August 22, 2014 01:59
-
-
Save guilhermesilveira/d647863a1deafb8823e7 to your computer and use it in GitHub Desktop.
MyWeld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyWeld { | |
private static WeldContainer weldContainer = new Weld().initialize(); | |
public static void main(String[] args) { | |
System.out.println(get(Router.class).allRoutes().size()); | |
get(Router.class).allRoutes().stream().map(Route::getOriginalUri).forEach(System.out::println); | |
} | |
private static <T> T get(Class<T> type) { | |
T instance = weldContainer.instance().select(type).get(); | |
return instance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment