Package | Description |
---|---|
org.springframework.beans |
This package contains interfaces and classes for manipulating Java beans.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
BeanUtils.instantiate(java.lang.Class<T> clazz)
Deprecated.
as of Spring 5.0, following the deprecation of
Class.newInstance() in JDK 9 |
static <T> T |
BeanUtils.instantiateClass(java.lang.Class<?> clazz,
java.lang.Class<T> assignableTo)
Instantiate a class using its no-arg constructor and return the new instance
as the specified assignable type.
|
static <T> T |
BeanUtils.instantiateClass(java.lang.Class<T> clazz)
Instantiate a class using its 'primary' constructor (for Kotlin classes,
potentially having default arguments declared) or its default constructor
(for regular Java classes, expecting a standard no-arg setup).
|
static <T> T |
BeanUtils.instantiateClass(java.lang.reflect.Constructor<T> ctor,
java.lang.Object... args)
Convenience method to instantiate a class using the given constructor.
|