Package com.sun.jna

Class Klass

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

abstract class Klass extends Object
  • 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