di: better diag for abstract classes
This commit is contained in:
@@ -350,6 +350,9 @@ public class DependencyInjectorGenerator {
|
|||||||
if (type.isInterface()) {
|
if (type.isInterface()) {
|
||||||
throw new IllegalArgumentException("cannot instantiate interface: " + type.getName() + " needed for " + neededFor);
|
throw new IllegalArgumentException("cannot instantiate interface: " + type.getName() + " needed for " + neededFor);
|
||||||
}
|
}
|
||||||
|
if (Modifier.isAbstract(type.getModifiers())) {
|
||||||
|
throw new IllegalArgumentException("cannot instantiate abstract class: " + type.getName() + " needed for " + neededFor);
|
||||||
|
}
|
||||||
|
|
||||||
// Look for constructor
|
// Look for constructor
|
||||||
Constructor<?>[] constructors = type.getConstructors();
|
Constructor<?>[] constructors = type.getConstructors();
|
||||||
|
|||||||
Reference in New Issue
Block a user