newInstance method (format 3)
Description
Executes the constructor indicated by the parameter cons in the parameter args, and then directly creates the instance in the Explicit memory block indicated by the object. Only the instances of the class specified in the parameter are created in the Explicit memory block. The objects created through initialization by the constructor of the instances of class specified in the parameter are created in the Java heap.
Format
public Object newInstance(java.lang.reflect.Constructor cons, Object... args);
Parameters
Exceptions
Return value
This method returns the reference to the instances created in the Explicit memory block indicated by the method.
If it is judged that processing cannot be executed by performing the common error check, invoke parameter cons of java.lang.reflect.Constructor.newInstance(Object... initargs) as this object, parameter args as a parameter, and return that result. For details on common error check, see 10.6 Error check (common error check) of the process that controls the Explicit memory block .
Caution
We recommend that you add the constructor of a public class in the parameter cons.