MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / copyField

Method copyField

java/src/org/openqa/selenium/remote/Augmenter.java:290–302  ·  view source on GitHub ↗
(Object source, Object target, Field field)

Source from the content-addressed store, hash-verified

288 }
289
290 private void copyField(Object source, Object target, Field field) {
291 if (Modifier.isStatic(field.getModifiers())) {
292 return;
293 }
294
295 try {
296 field.setAccessible(true);
297 Object value = field.get(source);
298 field.set(target, value);
299 } catch (IllegalAccessException e) {
300 throw new RuntimeException(e);
301 }
302 }
303
304 private static class Augmentation<X> {
305 public final Predicate<Capabilities> whenMatches;

Callers 1

copyFieldsMethod · 0.95

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected