Package com.sun.jna

# Class Klass

java.lang.Object
com.sun.jna.Klass

abstract class Klass extends Object

## Method Summary

Modifier and Type
Method
Description
`static <T> T`
`newInstance(Class<T> klass)`
Create a new instance for the given `klass`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### newInstance

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 `IllegalArgumentException` and rethrown.

Parameters:
  `klass` - desired class to instantiate
Returns:
  the new instance
Throws:
  `IllegalArgumentException` - if the instantiation fails
  `RuntimeException` - if the constructor for `klass` throws a runtime exception