@ SuppressWarnings ( "rawtypes" ) private static CTShape getCtShapeFromVml ( final Cell sourceCell , XSSFVMLDrawing sourceVml ) throws ReflectiveOperationException { Method findshape ; // int parameter Class [ ] paramInt = new Class [ 2 ] ; paramInt [ 0 ] = Integer . TYPE ; paramInt [ 1 ] = Integer . TYPE ; findshape = sourceVml . getClass ( ) . getDeclaredMethod ( "findCommentShape" , paramInt ) ; findshape . setAccessible ( true ) ; return ( CTShape ) findshape . invoke ( sourceVml , sourceCell . getRowIndex ( ) , sourceCell . getColumnIndex ( ) ) ; }
Find CtShape from vml object . This class use reflection to invoke the protected method in POI .