Package software.amazon.jsii
Class UnsafeCast
java.lang.Object
software.amazon.jsii.UnsafeCast
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends JsiiSerializable>
TunsafeCast(JsiiObject value, Class<T> target) Unsafely obtains a view on a given value as an instance of an interface annotated with theJsii.Proxyannotation.
-
Method Details
-
unsafeCast
Unsafely obtains a view on a given value as an instance of an interface annotated with theJsii.Proxyannotation.- Type Parameters:
T- the return type of the cast.- Parameters:
value- the value to be converted.target- the target type to obtain. This must be an interface with theJsii.Proxyannotation.- Returns:
- the converted value. Will only return
nullifvalueisnull. - Throws:
IllegalArgumentException- if the providedtargetis not aJsii.Proxyannotated interface.
-