/** * Returns the value of the local variable at the given index. * * @param index The index of the local to return. * @return The value of local at the given index. */ public ValueMirror getLocalValue(final int index) { V8Array parameters = new V8Array(v8Object.getRuntime()); parameters.push(index); V8Object result = null; try { result = v8Object.executeObjectFunction(LOCAL_VALUE, parameters); if (!isValue(result)) { throw new IllegalStateException("Local value is not a ValueMirror"); } return createMirror(result); } finally { parameters.close(); if (result != null) { result.close(); } } }
/** * Returns the value of the local variable at the given index. * * @param index The index of the local to return. * @return The value of local at the given index. */ public ValueMirror getLocalValue(final int index) { V8Array parameters = new V8Array(v8Object.getRuntime()); parameters.push(index); V8Object result = null; try { result = v8Object.executeObjectFunction(LOCAL_VALUE, parameters); if (!isValue(result)) { throw new IllegalStateException("Local value is not a ValueMirror"); } return createMirror(result); } finally { parameters.close(); if (result != null) { result.close(); } } }
/** * Returns the value of the local variable at the given index. * * @param index The index of the local to return. * @return The value of local at the given index. */ public ValueMirror getLocalValue(final int index) { V8Array parameters = new V8Array(v8Object.getRuntime()); parameters.push(index); V8Object result = null; try { result = v8Object.executeObjectFunction(LOCAL_VALUE, parameters); if (!isValue(result)) { throw new IllegalStateException("Local value is not a ValueMirror"); } return createMirror(result); } finally { parameters.release(); if (result != null) { result.release(); } } }
/** * Returns the value of the local variable at the given index. * * @param index The index of the local to return. * @return The value of local at the given index. */ public ValueMirror getLocalValue(final int index) { V8Array parameters = new V8Array(v8Object.getRuntime()); parameters.push(index); V8Object result = null; try { result = v8Object.executeObjectFunction(LOCAL_VALUE, parameters); if (!isValue(result)) { throw new IllegalStateException("Local value is not a ValueMirror"); } return createMirror(result); } finally { parameters.release(); if (result != null) { result.release(); } } }