I was playing with Java Reflection API and observed that methods with variadic argument list become transient. Why is that and what does transient
keyword mean in t
Sort of an answer can be found in the code of javassist AccessFlag
public static final int TRANSIENT = 0x0080;
public static final int VARARGS = 0x0080;
It appears both have the same values. And since transient
means nothing for methods, while varargs means nothing for fields, it is ok for them to be the same.
But it is not OK for the Modifier
class not to take this into account. I'd file an issue about it. It needs a new constant - VARARGS
and a new method - isVarargs(..)
. And the toString()
method can be rewritten to include "transient/varargs".