Package com.sun.jna
Class Klass
java.lang.Object
com.sun.jna.Klass
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> TnewInstance(Class<T> klass) Create a new instance for the givenklass.
- 
Method Details- 
newInstanceCreate 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:
- IllegalArgumentException- if the instantiation fails
- RuntimeException- if the constructor for- klassthrows a runtime exception
 
 
-