Klass (JNA API)

com.sun.jna

## Class Klass

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

-     abstract class Klass
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `newInstance(java.lang.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 Detail

    - #### newInstance

          public static <T> T newInstance(java.lang.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:
        `java.lang.IllegalArgumentException` - if the instantiation fails
        `java.lang.RuntimeException` - if the constructor for `klass` throws a runtime exception

Copyright © 2007-2018 Timothy Wall. All Rights Reserved.