MCPcopy Create free account
hub / github.com/beanshell/beanshell / setIndex

Method setIndex

src/bsh/Reflect.java:188–200  ·  view source on GitHub ↗
(Object array, int index, Object val)

Source from the content-addressed store, hash-verified

186
187
188 public static void setIndex(Object array, int index, Object val) throws ReflectError, UtilTargetError {
189 try {
190 val = Primitive.unwrap(val);
191 Array.set(array, index, val);
192 } catch (ArrayStoreException e2) {
193 throw new UtilTargetError(e2);
194 } catch (IllegalArgumentException e1) {
195 //noinspection ThrowableInstanceNeverThrown
196 throw new UtilTargetError(new ArrayStoreException(e1.toString()));
197 } catch (Exception e) {
198 throw new ReflectError("Array access:" + e);
199 }
200 }
201
202
203 public static Object getStaticFieldValue(Class clas, String fieldName) throws UtilEvalError, ReflectError {

Callers 1

assignMethod · 0.95

Calls 3

unwrapMethod · 0.95
setMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected