public final class ReflectionUtils extends Object
?????? | ????? |
---|---|
static Class<?> |
getClassByName(String name)
Loads a class by name.
|
static <T> T |
newInstance(Class<T> klass,
Object... args)
Uses the constructor represented by this
Constructor object to
create and initialize a new instance of the constructor's declaring
class, with the specified initialization parameters. |
public static <T> T newInstance(Class<T> klass, Object... args)
Constructor
object to
create and initialize a new instance of the constructor's declaring
class, with the specified initialization parameters.T
- type for the new instanceklass
- the Class object.args
- array of objects to be passed as arguments to the constructor
call.public static Class<?> getClassByName(String name) throws ClassNotFoundException
name
- the class name.ClassNotFoundException
- if the class is not found.Copyright © 2016 The Apache Software Foundation. All rights reserved.