/*
 */

package com.voodoodyne.gstrap;

import com.google.inject.Injector;

import javax.inject.Inject;

/**
 * A static reference to the Injector so that entities and other hard-to-inject places can use
 * injection. Avoid using this where possible, but use it where you must.
 *
 * Requires requestStaticInjection()
 */
public class Inj {
	@Inject
	static private Injector injector;

	static public Injector injector() {
		return injector;
	}

	static public <T> T inst(final Class<T> type) {
		return injector.getInstance(type);
	}
}
@@ -72,35 +72,105 @@
 or;%0A
-%0Aimport javax.inject.Inject
+import com.google.inject.Key;%0A%0Aimport javax.inject.Inject;%0Aimport java.lang.annotation.Annotation
 ;%0A%0A/
@@ -597,10 +597,175 @@
 ype);%0A%09%7D
+%0A%0A%09static public %3CT%3E T inst(final Class%3CT%3E type, final Class%3C? extends Annotation%3E annotationType) %7B%0A%09%09return injector.getInstance(Key.get(type, annotationType));%0A%09%7D
 %0A%7D

Add convenience method to Inj