Example #1
0
 @Override
 public void visitMultiANewArrayInsn(final String desc, final int dims) {
     checkStartCode();
     checkEndCode();
     checkDesc(desc, false);
     if (desc.charAt(0) != '[') {
         throw new IllegalArgumentException(
                 "Invalid descriptor (must be an array type descriptor): "
                         + desc);
     }
     if (dims < 1) {
         throw new IllegalArgumentException(
                 "Invalid dimensions (must be greater than 0): " + dims);
     }
     if (dims > desc.lastIndexOf('[') + 1) {
         throw new IllegalArgumentException(
                 "Invalid dimensions (must not be greater than dims(desc)): "
                         + dims);
     }
     super.visitMultiANewArrayInsn(desc, dims);
     ++insnCount;
 }