Package 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 Description static <T> TnewInstance(java.lang.Class<T> klass)Create a new instance for the givenklass.
-
-
-
Method Detail
-
newInstance
public static <T> T newInstance(java.lang.Class<T> klass)
Create a new instance for the givenklass. Runtime exceptions thrown from the constructor are rethrown, all other exceptions generated from the reflective call are wrapped into aIllegalArgumentExceptionand rethrown.- Parameters:
klass- desired class to instantiate- Returns:
- the new instance
- Throws:
java.lang.IllegalArgumentException- if the instantiation failsjava.lang.RuntimeException- if the constructor forklassthrows a runtime exception
-
-