private static void createArrayDefinition(final MethodVisitor mv, final int size, final Class<?> type)
throws ProxyGenerationException {
// create a new array of java.lang.class (2)
if (size < 0) {
throw new ProxyGenerationException("Array size cannot be less than zero");
}
pushIntOntoStack(mv, size);
mv.visitTypeInsn(ANEWARRAY, type.getCanonicalName().replace('.', '/'));