Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I change the value of parameters passed to a Java method?

Java method parameters value
0
Posted

Can I change the value of parameters passed to a Java method?

0

Yes, starting with RootCause version 2.1.3a (April 2004). There are two parts: • In the deployment descriptor XML file, indicate that the parameters are read/write (not the default of read-only): • In the probe itself, simply assign new Objects to the params vector: import com.ocsystems.aprobe.*; public class TestParamsProbe extends ProbeMethod { public boolean onEntry (Object[] params) { // params [0], the ‘this’ parameter, can’t and won’t be changed. params [1] = new String (“This is a new string”); params [2] = new Boolean (true); return true; } public Object onExit (Object returnValue) { int value = ((Integer) returnValue).

0

Yes, starting with RootCause version 2.1.3a (April 2004). There are two parts: • In the deployment descriptor XML file, indicate that the parameters are read/write (not the default of read-only): • In the probe itself, simply assign new Objects to the params vector: import com.ocsystems.aprobe.*; public class TestParamsProbe extends ProbeMethod { public boolean onEntry (Object[] params) { // params [0], the ‘this’ parameter, can’t and won’t be changed.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123