1.用Java方式
val clazz = Class.forName("xxx").newInstance().asInstanceOf[BaseClassXXXX]
2.用scala方式
val runtimeMirror = scala.reflect.runtime.universe.runtimeMirror(getClass.getClassLoader)
val module = runtimeMirror.staticModule(“class package full name”)
val filter = runtimeMirror.reflectModule(module).instance.asInstanceOf [BaseClassXXXXX]