java - How to check if function was called by value? -
Edit: How do I use the type of parameter on the compilation of time to use an eclipse parser?
I am trying to check whether the function was My question is, how was actually investigated by the call price or terms I and could not forward The Ana For example, I tried: but I want to know how the logic type (int / bool / double / ... ) In case of primitive, you know the type, it is not known how it is because it is not dynamic. That is, there is no way, that you know about the compilation of times, can be different for this. For objects, there are several ways to find out that because a normal one this An easy way to show that Java has passed the context of value is to change the context. but r_type always starts to empty. This may be because your test will always fail. That is, it is always false. Or the list is always empty because you did not put anything in it. I suggest that you take steps to better understand your program by using your debugger through your code. public boolean visits (method Invocation node) {}
node Tried the member functions of:
typeArguments () argument () getExpression ()
list r_type = node.typeArguments (); If (r_type.toString () == "int") {....}
r_type always starts to empty.
instanceof example
object o = ... if (o installation integer) {} else if (o installation Boolean) {} else if (o two insatanceof) {} else {// error}
Public boolean visit (method invocation node) {node = null; } Method Invocation node = new method Invocation (); Go to (node); // it changes to null system.out.printline (node); // No not the node is unchanged
Comments
Post a Comment