MCPcopy Create free account
hub / github.com/cbeust/jcommander / set

Method set

src/main/java/com/beust/jcommander/Parameterized.java:295–312  ·  view source on GitHub ↗
(Object object, Object value)

Source from the content-addressed store, hash-verified

293 }
294
295 public void set(Object object, Object value) {
296 try {
297 if (method != null) {
298 method.invoke(object, value);
299 } else {
300 field.set(object, value);
301 }
302 } catch (IllegalAccessException | IllegalArgumentException ex) {
303 throw new ParameterException(errorMessage(method, ex));
304 } catch (InvocationTargetException ex) {
305 // If a ParameterException was thrown, don't wrap it into another one
306 if (ex.getTargetException() instanceof ParameterException pe) {
307 throw pe;
308 } else {
309 throw new ParameterException(errorMessage(method, ex), ex.getTargetException());
310 }
311 }
312 }
313
314 public ParametersDelegate getDelegateAnnotation() {
315 return parametersDelegate;

Callers 15

build.gradle.ktsFile · 0.80
addValueMethod · 0.80
handleSubParametersMethod · 0.80
addValueMethod · 0.80
addValueMethod · 0.80
ZFunction · 0.80
leFunction · 0.80
veFunction · 0.80
SeFunction · 0.80
LeFunction · 0.80

Calls 1

errorMessageMethod · 0.95

Tested by

no test coverage detected