public class ReflectionConstructor
extends java.lang.Object
构造器和说明 |
---|
ReflectionConstructor() |
public static final <E> E construct(java.lang.String classname, java.lang.Class<E> targetclass)
E
- The generic type of the returned value.classname
- The class name of the instance to create.targetclass
- The return type of the created instancejava.lang.IllegalArgumentException
- if there is a problem locating the class instance.java.lang.IllegalStateException
- if there is a problem instantiating a class instance.