Top Constructors Methods
com.sun.jna

pack-priv abstract Class Klass

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T> T

Returns:

the new instance
newInstance
(Class<T>
desired class to instantiate
klass
)

Create a new instance for the given klass.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Klassback to summary
private Klass()

Method Detail

newInstanceback to summary
public static <T> T newInstance(Class<T> klass)

Create a new instance for the given klass. Runtime exceptions thrown from the constructor are rethrown, all other exceptions generated from the reflective call are wrapped into a java.lang.IllegalArgumentException and rethrown.

Parameters
klass:Class<T>

desired class to instantiate

Returns:T

the new instance

Exceptions
IllegalArgumentException:
if the instantiation fails
RuntimeException:
if the constructor for klass throws a runtime exception