import javax.enterprise.inject.spi.BeanManager;
import javax.enterprise.inject.spi.InjectionTarget;
+import org.wamblee.inject.Injector;
+
/**
* Class encapsulating bean injection into a specific non-contextual object of a
* given class.
public void inject(Object aComponent) {
if (aComponent != null) {
if (!clazz.isInstance(aComponent)) {
- throw new RuntimeException("Object '" + aComponent +
+ throw new IllegalArgumentException("Object '" + aComponent +
"' is of type " + aComponent.getClass().getName() +
" but expected " + clazz.getName());
}