public static IRubyObject arefDirect(Ruby runtime, Object array, JavaUtil.JavaConverter javaConverter, int index) { try { return JavaUtil.convertJavaArrayElementToRuby(runtime, javaConverter, array, index); } catch (IndexOutOfBoundsException e) { throw mapIndexOutOfBoundsException(runtime, array, index); } }
public static IRubyObject arefDirect(Ruby runtime, Object array, JavaUtil.JavaConverter javaConverter, int index) { try { return JavaUtil.convertJavaArrayElementToRuby(runtime, javaConverter, array, index); } catch (IndexOutOfBoundsException e) { throw mapIndexOutOfBoundsException(runtime, array, index); } }
public static void setWithExceptionHandlingDirect(Ruby runtime, Object array, int index, Object javaValue) { try { Array.set(array, index, javaValue); } catch (IndexOutOfBoundsException e) { throw mapIndexOutOfBoundsException(runtime, array, index); } catch (ArrayStoreException e) { throw mapArrayStoreException(runtime, array, javaValue.getClass()); } catch (IllegalArgumentException e) { throw mapIllegalArgumentException(runtime, array, javaValue.getClass()); } }
public static void setWithExceptionHandlingDirect(Ruby runtime, Object array, int index, Object javaValue) { try { Array.set(array, index, javaValue); } catch (IndexOutOfBoundsException e) { throw mapIndexOutOfBoundsException(runtime, array, index); } catch (ArrayStoreException e) { throw mapArrayStoreException(runtime, array, javaValue.getClass()); } catch (IllegalArgumentException e) { throw mapIllegalArgumentException(runtime, array, javaValue.getClass()); } }
public static IRubyObject asetDirect(Ruby runtime, Object array, JavaUtil.JavaConverter javaConverter, int index, IRubyObject value) { try { javaConverter.set(runtime, array, index, value); } catch (IndexOutOfBoundsException e) { throw mapIndexOutOfBoundsException(runtime, array, index); } catch (ArrayStoreException e) { throw mapArrayStoreException(runtime, array, value.getClass()); } catch (IllegalArgumentException e) { throw mapIllegalArgumentException(runtime, array, value.getClass()); } return value; }
public static IRubyObject asetDirect(Ruby runtime, Object array, JavaUtil.JavaConverter javaConverter, int index, IRubyObject value) { try { javaConverter.set(runtime, array, index, value); } catch (IndexOutOfBoundsException e) { throw mapIndexOutOfBoundsException(runtime, array, index); } catch (ArrayStoreException e) { throw mapArrayStoreException(runtime, array, value.getClass()); } catch (IllegalArgumentException e) { throw mapIllegalArgumentException(runtime, array, value.getClass()); } return value; }